|
ginnOS
The reference: libc, the libraries and the kernel
|
the display layer (see display.h) and /dev/display. More...
#include "display.h"#include "common/fb/fb_ioctl.h"#include "common/memory.h"#include "common/string.h"#include "kernel/device/device.h"#include "kernel/errno.h"#include "kernel/memory/heap.h"#include "kernel/process/process.h"#include "kernel/signal/signal.h"#include "kernel/sync/spinlock.h"#include "kernel/sync/wait_queue.h"#include "kernel/vfs/file.h"#include "kernel/vfs/poll.h"#include "kernel/vfs/stat.h"Macros | |
| #define | MAX_READERS 4 |
| #define | RING_EVENTS 8 |
Functions | |
| 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). | |
| 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 *d) |
| 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_init (void) |
| register /dev/display. | |
the display layer (see display.h) and /dev/display.
each open of /dev/display is a reader with a small ring of fb_event_t. a driver's interrupt only marks that the size the screen wants may have changed; the driver is asked for it in process context (a read or a poll), as asking can wait for the device.
| #define MAX_READERS 4 |
| #define RING_EVENTS 8 |
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.
| 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.
| void display_init | ( | void | ) |
register /dev/display.
call once, before the drivers.