fb: introduce framebuffer support to Minix

This patch introduces a framebuffer to Minix. It's written for the ARM
port of Minix, but has an architectural split that separates the
hardware dependent part from the non-hardware dependent part. Futhermore,
this driver was developed using a screen that has a native resolution of
1024x600 pixels and having lack of support for obtaining EDID from the
screen. Consequently, it uses a hardcoded resolution of 1024x600.

The driver uses an interface based on the Linux ioctl API, but supports
only a very limited subset.
This commit is contained in:
Thomas Veerman
2013-02-21 10:29:08 +00:00
parent 2aa82a9c7b
commit ba49a155b5
23 changed files with 3936 additions and 9 deletions
+1 -1
View File
@@ -10,7 +10,7 @@ INCS+= acpi.h audio_fw.h bitmap.h \
config.h const.h cpufeature.h crtso.h \
debug.h devio.h devman.h dmap.h \
driver.h drivers.h drvlib.h ds.h \
endpoint.h fslib.h gpio.h gcov.h hash.h \
endpoint.h fb.h fslib.h gpio.h gcov.h hash.h \
hgfs.h ioctl.h input.h ipc.h ipcconst.h \
keymap.h limits.h log.h mmio.h mount.h mthread.h minlib.h \
netdriver.h optset.h padconf.h partition.h portio.h \
+1
View File
@@ -38,6 +38,7 @@ enum dev_style { STYLE_NDEV, STYLE_DEV, STYLE_DEVA, STYLE_TTY, STYLE_CTTY,
#define RANDOM_MAJOR 16 /* 16 = /dev/random (random driver) */
#define HELLO_MAJOR 17 /* 17 = /dev/hello (hello driver) */
#define UDS_MAJOR 18 /* 18 = /dev/uds (pfs) */
#define FB_MAJOR 19 /* 18 = /dev/fb0 (fb driver) */
/* Minor device numbers for memory driver. */
+38
View File
@@ -0,0 +1,38 @@
#ifndef __MINIX_FB_H_
#define __MINIX_FB_H_
#include <minix/type.h>
struct fb_fix_screeninfo {
char id[16]; /* Identification string */
u16_t xpanstep;
u16_t ypanstep;
u16_t ywrapstep;
u32_t line_length;
phys_bytes mmio_start;
size_t mmio_len;
u16_t reserved[15];
};
struct fb_bitfield {
u32_t offset;
u32_t length;
u32_t msb_right;
};
struct fb_var_screeninfo {
u32_t xres; /* visible resolution */
u32_t yres;
u32_t xres_virtual; /* virtual resolution */
u32_t yres_virtual;
u32_t xoffset; /* offset from virtual to visible */
u32_t yoffset;
u32_t bits_per_pixel;
struct fb_bitfield red; /* bitfield in fb mem if true color */
struct fb_bitfield green;
struct fb_bitfield blue;
struct fb_bitfield transp; /* transparency */
u16_t reserved[10];
};
#endif /* __MINIX_FB_H_ */