|
AquilaOS documentation
How it works, and its code
|
The framebuffer devices: /dev/fb0 and up (character device 29, as on Linux). More...
#include <core/system.h>#include <sys/uaccess.h>#include <core/module.h>#include <dev/fbdev.h>#include <dev/ramdev.h>#include <fs/vfs.h>#include <fs/devfs.h>#include <fs/posix.h>Go to the source code of this file.
Macros | |
| #define | MAX_FBDEV 2 |
Functions | |
| int | fbdev_register (int type, void *data) |
| Registers a framebuffer, which fbdev_probe() sets up with its driver. | |
| static struct fbdev * | fbdev_get (struct devid *dd) |
| Returns the framebuffer of a device number, or NULL if there's none. | |
| struct fbdev * | fbdev_primary (void) |
| Returns the first framebuffer, once it is set up, for the virtual terminals. | |
| static ssize_t | fbdev_write (struct devid *dd, off_t offset, struct iobuf *io) |
| Writes to a framebuffer, through its driver. | |
| static int | fbdev_ioctl (struct devid *dd, int request, void *argp) |
| Handles Linux's framebuffer ioctl()s: the screen information, which can be read but not changed, and panning, which isn't supported. | |
| static int | fbdev_map (struct devid *dd, struct vm_space *vm_space, struct vm_entry *vm_entry) |
| Maps a framebuffer into a process's address space, through its driver. | |
| int | fbdev_probe () |
| Sets up the registered framebuffers with their drivers, and registers the framebuffer devices. | |
Variables | |
| static struct fbdev | registered_fbs [MAX_FBDEV] |
| static size_t | fbdev_cnt = 0 |
| struct dev | fbdev |
The framebuffer devices: /dev/fb0 and up (character device 29, as on Linux).
A framebuffer driver registers its framebuffer here, and this layer gives it its device, with Linux's framebuffer ioctl()s to describe it. Writing to the device writes pixels, and mmap() maps the framebuffer into the process. The only driver is the VESA framebuffer (dev/fb/vesa/vesa.c).
Definition in file fbdev.c.
| #define MAX_FBDEV 2 |
Definition at line 23 of file fbdev.c.
Referenced by fbdev_register().
Returns the framebuffer of a device number, or NULL if there's none.
Definition at line 49 of file fbdev.c.
References fbdev_cnt, fbdev_get(), devid::minor, NULL, and registered_fbs.
Referenced by fbdev_get(), fbdev_ioctl(), fbdev_map(), and fbdev_write().
|
static |
Handles Linux's framebuffer ioctl()s: the screen information, which can be read but not changed, and panning, which isn't supported.
Definition at line 84 of file fbdev.c.
References fb, fbdev_get(), fbdev_ioctl(), fbdev::fix_screeninfo, and fbdev::var_screeninfo.
Referenced by fbdev_ioctl().
Maps a framebuffer into a process's address space, through its driver.
Definition at line 135 of file fbdev.c.
References fb, fbdev_get(), fbdev_map(), and fbdev::map.
Referenced by fbdev_map().
| struct fbdev * fbdev_primary | ( | void | ) |
Returns the first framebuffer, once it is set up, for the virtual terminals.
Definition at line 63 of file fbdev.c.
References fbdev_cnt, fbdev_primary(), fbdev::fix_screeninfo, NULL, and registered_fbs.
Referenced by fbdev_primary(), and vt_fb_probe().
| int fbdev_probe | ( | ) |
Sets up the registered framebuffers with their drivers, and registers the framebuffer devices.
Definition at line 151 of file fbdev.c.
References fb, fbdev_cnt, fbdev_probe(), FBDEV_TYPE_VESA, kdev_chrdev_register(), registered_fbs, and fbdev::type.
Referenced by fbdev_probe().
| int fbdev_register | ( | int | type, |
| void * | data ) |
Registers a framebuffer, which fbdev_probe() sets up with its driver.
The first one registered is /dev/fb0.
| type | its driver (FBDEV_TYPE_VESA) |
| data | what the driver needs to set it up (the VESA mode's description) |
Definition at line 37 of file fbdev.c.
References fbdev::data, fbdev_cnt, fbdev_register(), MAX_FBDEV, registered_fbs, and fbdev::type.
Referenced by fbdev_register(), and process_multiboot_info().
Writes to a framebuffer, through its driver.
Definition at line 72 of file fbdev.c.
References fb, fbdev_get(), fbdev_write(), and fbdev::write.
Referenced by fbdev_write().
| struct dev fbdev |
|
static |
Definition at line 26 of file fbdev.c.
Referenced by fbdev_get(), fbdev_primary(), fbdev_probe(), and fbdev_register().
Definition at line 25 of file fbdev.c.
Referenced by fbdev_get(), fbdev_primary(), fbdev_probe(), and fbdev_register().