Writing Device Drivers

Video Mode Change Callback Interface

The console frame buffer driver and the kernel terminal emulator must be in agreement about the video mode at all times. Video mode includes the console screen height, width, and depth in pixels. Video mode also includes whether communication between the kernel terminal emulator and the console frame buffer is in VGA text mode or pixel mode.

In order for the console frame buffer driver to notify the kernel terminal emulator of changes in the video mode, the console frame buffer driver is initialized with the address of the (*modechg_cb)() kernel terminal emulator callback function described in the following table:

Callback Function 

Corresponding Data Structures 

Description 

(*modechg_cb)()

vis_modechg_arg

vis_devinit

Keep the terminal emulator module synchronized with the driver video mode (screen height, width, and pixel depth).