Subject: Re: proplib and wsdisplay drivers
To: None <tech-kern@netbsd.org>
From: Michael Lorenz <macallan@netbsd.org>
List: tech-kern
Date: 12/17/2006 02:20:30
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
> To deal with this I propose the following:
> All platforms that use graphical consoles on more or less MI bus
> systems are required to implement device_register(), intercept all
> attachments of potential console output devices, determine if any of
> them is going to be system console in whatever way is appropriate on
> the resp. platform and add the following property to the device's
> dictionary:
> 'is_console', type bool, can be true on up to one device.
> A driver is going to become console only when it finds 'is_console'
> with the value 'true' in its dictionary.
> If the firmware or anything set up a usable graphics mode add the
> following properties:
> 'width', 'height', 'linebytes' - width and height in pixels, line size
> in bytes
> 'depth' - colour depth in bits
> 'address' - physical address of the framebuffer ( or rather, address
> of the upper left pixel )
> we'll probably need more properties to support less than 8 bit,
> amiga-like interleaved bitmaps etc. the properties mentioned above are
> essentially what OpenFirmware gives us, usually in 8 bit.
Hmm, if we provide a property that maps wscons colour codes to whatever
palette the firmware set up we could implement a truly MI generic
framebuffer console driver - let's call it dumbfb - which would allow
us to:
- - get rid of macppc's ofb and other MD dumb framebuffer drivers
- - support all firmware-supported framebuffers on sparc, sparc64, ofppc,
probably prep and many more
- - finally switch sparc to wscons, just use dumbfb whenever there's no
hw-specific driver ( some of those may need to be changed to return a
score > 1 in their match() methods )
Maybe make it mandatory that hw-specific drivers for anything return
something >1 and only generic catch-alls which handle a whole class of
devices are allowed to return 1.
We'll probably have to copy something like OF's assigned-addresses or
regs property to allow X to mmap() a graphics device's registers,
apertures and so on. Without that we could still use wsfb.
have fun
Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)
iQEVAwUBRYTvvspnzkX8Yg2nAQIlAQf9Gx1oer7qMALQqiLW94QdYwG4urL7iQk8
YduN9RRwV/pHKclbCie0O0yMZnCJNgLkwAk9n/DFkP1F9uefJ+pqQiiHE7qsurbm
unl8+ZmF7/H3RzR7+8P47ZuXv202U6uG/xJ2Kz+cMuJoCDlMIrWa9TKgYbW9xFhT
13G2gX290Ou/MWTnimuEhZxCdHufUxiPrw4+BE/M4UQpLtDVaJ2cPkMMDNje03Cn
Rofr/BoYd8DuxXCVOwLa1mtDt1+9CDTY0wkNEwcWij/byfAJohpASteUqC2aW24G
p6m73CObj3GWUvWmtRR+RVVLFl+x1nRLLegqLY3D05l8PCXKtiWiRA==
=1dzf
-----END PGP SIGNATURE-----