The cgfour is a color memory frame buffer with a monochrome overlay plane and an overlay enable plane. It provides the standard frame buffer interface as defined in fbio(7I).
In addition to the ioctls described under fbio(7I) the cgfour interface responds to two cgfour-specific colormap ioctls, FBIOPUTCMAP and FBIOGETCMAP. FBIOPUTCMAP returns no information other than success/failure using the ioctl return value. FBIOGETCMAP returns its information in the arrays pointed
to by the red, green, and blue members of its fbcmap structure argument; fbcmap is defined in <sys/fbio.h> as:
|
struct fbcmap {
int index; /* first element (0 origin) */
int count; /* number of elements */
unsigned char *red /* red color map elements */
unsigned char *green; /* green color map elements */
unsigned char *blue; /* blue color map elements */
};
|
The driver uses color board vertical-retrace interrupts to load the colormap.
The cgfour has an overlay plane colormap, which is accessed by encoding the plane group into the index value with the PIX_GROUP macro (see <sys/pr_planegroups.h>).
|