fb(4) - NetBSD Manual Pages

FB(4)                NetBSD/pmax Kernel Interfaces Manual                FB(4)


NAME
fb - pmax frame buffer driver
SYNOPSIS
pseudo-device fb N
DESCRIPTION
The fb driver provides a frame buffer driver which is generic driver for all supported framebuffers on NetBSD/pmax. The devices to which this applies are the cfb(4), mfb(4), sfb(4), pm(4) (color and mono), px(4), and xcfb(4) frame buffers. It provides support for the ULTRIX-compatible pm/QVSS-style interface, mostly so that X consortium Xservers work. It also provides support for the Sun-style frame buffer interface which is compatible with existing NetBSD applications. The basic programming of the fb devices involves opening the device file, mapping the control registers and frame buffer addresses into user space, and then manipulating the device as the application requires. The address mapping is controlled by an ioctl(2) call to map the device into user space, and an unmap call when finished. The pm/QVSS-style ioctls supported by NetBSD are: QIOCGINFO Get Graphics Info Get info about the device, setting the entries in the pm_info structure, as defined in <pmax/pmioctl.h>: typedef struct pm_info { pmEventQueue qe; /* event & motion queues */ short mswitches; /* current value of mouse btns */ pmCursor tablet; /* current tablet position */ short tswitches; /* current tablet buttons NI! */ pmCursor cursor; /* current cursor position */ short row; /* screen row */ short col; /* screen col */ short max_row; /* max character row */ short max_col; /* max character col */ short max_x; /* max x position */ short max_y; /* max y position */ short max_cur_x; /* max cursor x position */ short max_cur_y; /* max cursor y position */ int version; /* version of driver */ char *bitmap; /* bit map position */ short *scanmap; /* scanline map position */ short *cursorbits; /* cursor bit position */ short *pmaddr; /* virtual address */ char *planemask; /* plane mask virtual location */ pmCursor mouse; /* atomic read/write */ pmBox mbox; /* atomic read/write */ short mthreshold; /* mouse motion parameter */ short mscale; /* mouse scale factor */ short min_cur_x; /* min cursor x position */ short min_cur_y; /* min cursor y position */ } PM_Info; QIOCPMSTATE Set Mouse State/Position Set mouse state/position, using the entries in the pmCursor structure, as defined in <pmax/pmioctl.h>: typedef struct { short x; short y; } pmCursor; QIOCINIT Initialize the Screen QIOCKPCMD Send Keyboard Command Send keyboard command, using the entries in the pm_kpcmd struc- ture, as defined in <pmax/pmioctl.h>: typedef struct pm_kpcmd { char nbytes; /* number of bytes in parameter */ unsigned char cmd; /* command to be sent */ unsigned char par[2]; /* bytes of params to be sent */ } pmKpCmd; QIOCADDR Get address Get address, setting the entries in the pm_info structure, as defined in <pmax/pmioctl.h>: QIOWCURSOR Write Cursor Bitmap QIOWCURSORCOLOR Background/Foreground RGB color QIOSETCMAP Set the Color Map Set the color map, using the entries in the ColorMap structure, as defined in <pmax/pmioctl.h>: typedef struct { short Map; unsigned short index; struct { unsigned short red; unsigned short green; unsigned short blue; } Entry; } ColorMap; QIOKERNLOOP Re-route kernel console output QIOKERNUNLOOP Do not re-route kernel console output QIOVIDEOON Turn on the video QIOVIDEOOFF Turn off the video The Sun-style ioctls supported by NetBSD are: FBIOGTYPE Get frame buffer type. Get info about the device, setting the entries in the fbtype structure,as defined in <pmax/fbio.h>: struct fbtype { int fb_boardtype; /* as defined above */ int fb_height; /* in pixels */ int fb_width; /* in pixels */ int fb_depth; /* bits per pixel */ int fb_cmsize; /* size of color map (entries) */ int fb_size; /* total size in bytes */ }; FBIOGETCMAP/FBIOPUTCMAP Color Map I/O Get or set the color map, using the entries in the fbcmap struc- ture,as defined in <pmax/fbio.h>: struct fbcmap { int index; /* first element (0 origin) */ int count; /* number of elements */ u_char *red; /* red color map elements */ u_char *green; /* green color map elements */ u_char *blue; /* blue color map elements */ }; FBIOGATTR Get FB Attribute Get fb attribute, setting the entries in the fbsatter struc- ture,as defined in <pmax/fbio.h>: struct fbsattr { int flags; /* flags; see below */ int emu_type; /* emulation (-1 if unused) */ int dev_specific[FB_ATTR_NDEVSPECIFIC]; }; FBIOGCURSOR/FBIOSCURSOR Get or Set Cursor Attributes/Shape Get or set the cursor attributes or shape, using the entries in the fbcursor structure, as defined in <pmax/fbio.h>: struct fbcursor { short set; /* what to set */ short enable; /* enable/disable cursor */ struct fbcurpos pos; /* cursor's position */ struct fbcurpos hot; /* cursor's hot spot */ struct fbcmap cmap; /* color map info */ struct fbcurpos size; /* cursor's bit map size */ char *image; /* cursor's image bits */ char *mask; /* cursor's mask bits */ }; FBIOGCURPOS/FBIOSCURPOS Get or Set Cursor Position Get or set cursor position, using the entries in the fbcursor structure. FBIOGCURMAX Get Maximum Cursor Size Get the maximum cursor size, setting the entries in the fbcursor structure. FBIOGVIDEO/FBIOSVIDEO Video Control Enable or disable the video. For further information about the use of ioctl see the man page.
FILES
/dev/fb* generic framebuffer pseudo-device
ERRORS
[ENODEV] no such device. [EBUSY] Another process has the device open. [EINVAL] Invalid ioctl specification.
SEE ALSO
cfb(4), mfb(4), pm(4), px(4), rcons(4), sfb(4), xcfb(4) NetBSD 2.0 September 21, 2001 NetBSD 2.0

Powered by man-cgi (2024-08-26). Maintained for NetBSD by Kimmo Suominen. Based on man-cgi by Panagiotis Christias.