Subject: Some proposed changes to struct wsdisplay_fbinfo
To: None <,>
From: Nathan J. Williams <nathanw@MIT.EDU>
List: tech-x11
Date: 04/16/2000 14:58:07
The wscons subsystem exports information about framebuffers via the
WSDISPLAYIO_GINFO ioctl, which returns a struct wsdisplay_fbinfo,
defined as follows (in <dev/wscons/wsconsio.h>):

struct wsdisplay_fbinfo {
        u_int   height;                         /* height in pixels */
        u_int   width;                          /* width in pixels */
        u_int   depth;                          /* bits per pixel */
        u_int   cmsize;                         /* color map size (entries) */

I've found this to be inadequate for my purposes (extending the TGA X
server to handle both 8- and 32-bpp cards), and would like to propose
a couple of extensions to the structure.

First, taking a cue from the sparc port's struct fbtype:
        int     size;        /* total size in bytes */

This will indicate the size of the framebuffer suitable for

Next, I would like to have some kind of device-type identifier
fields. This should be able to express such things as "PCI VGA: vendor
foo, product bar"; "Sun framebuffer: type"; "DEC framebuffer: type,
subtype", and so on. The values would be taken from a port's fbio.h
where possible (sparc, sun3, alpha, pmax). I think three integer
values is enough to encompass this; the first to encode a major type
(PCI VGA, other VGA, Sun, DEC, etc), the next a product (fbio value
for Sun and DEC; PCI vendor/product for PCI VGA), and the last any
product-specific subidentifier (such as TGA model type).

Exporting the PCI vendor and product code here will also facilitate
the use of XFree86 code where XFree86 doesn't know how (or shouldn't
be allowed) to scan the PCI bus itself.


        - Nathan