|
ginnOS
The reference: libc, the libraries and the kernel
|
display drivers: the layer between the fbdev (/dev/fb0) and a card that can change its mode. More...
Go to the source code of this file.
Data Structures | |
| struct | display_surface_t |
| a framebuffer in a mode: 32 bits per pixel, x8r8g8b8. More... | |
| struct | display_driver_t |
Functions | |
| void | display_init (void) |
| register /dev/display. | |
| const display_driver_t * | display_driver (void) |
| the driver in use, or NULL (the bootloader's framebuffer only). | |
| void | display_attach (const display_driver_t *driver) |
| use a driver from now on, and set the size the screen wants if it knows one. | |
| bool | display_mode_at (uint32_t index, uint32_t *width, uint32_t *height, bool *preferred) |
| a mode by index for FBIOGET_MODE: the preferred size first, then common sizes the driver can set. | |
| void | display_event (uint32_t type, uint32_t width, uint32_t height) |
| tell the readers of /dev/display about a change. | |
| void | display_preferred_changed (void) |
| the size the screen wants may have changed (a driver's interrupt calls it). | |
display drivers: the layer between the fbdev (/dev/fb0) and a card that can change its mode.
without a driver, the screen is the framebuffer the bootloader set up, in one mode. a driver (the Bochs/QEMU VGA, virtio-gpu) can set other sizes at run time, and can know the size the screen wants (the QEMU window). /dev/display tells programs when the mode or that size changes.
| void display_init | ( | void | ) |
register /dev/display.
call once, before the drivers.
| const display_driver_t * display_driver | ( | void | ) |
the driver in use, or NULL (the bootloader's framebuffer only).
| void display_attach | ( | const display_driver_t * | driver | ) |
use a driver from now on, and set the size the screen wants if it knows one.
call after fb_init.
a mode by index for FBIOGET_MODE: the preferred size first, then common sizes the driver can set.
tell the readers of /dev/display about a change.
| type | FB_EVENT_MODE or FB_EVENT_PREFERRED. |
| void display_preferred_changed | ( | void | ) |
the size the screen wants may have changed (a driver's interrupt calls it).
the driver is asked again in process context, when /dev/display is read or polled.