Subject: Re:
To: Andrew Doran <ad@hairylemon.org>
From: Michael <macallan18@earthlink.net>
List: tech-x11
Date: 03/22/2005 21:10:14
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

>> Hmm, but maybe generic raspos handler requires only "bit per pixel,"
>> doesn't it? "The actually significant number of bits" is provided
>> by info of each color in other members, I think.
>
> I was thinking of the TC mfb, which is mono but uses byte addressing.
> Only the lowest bit is significant (so depth of 1 and bpp of 8). Are
> there other devices like that?
Yes. Various HP framebuffers found in hp300 machines, like the CatsEye 
- - depth 6, bpp 8 ( or more? I'm not too sure... ). Tomcat uses depth 1 
bpp 8 if I remember correctly.

>> I think such device specific features could be determined by
>> WSDISPLAYIO_GTYPE.
>
> It may not be possible to drive certain types of display with the
> usual code (as is the case with the PixelStamp, no direct FB access).
> Rather than teaching the X server about each of the black sheep, why
> not have a flag passed down by the kernel?
This looks awfully like exposing a bunch of functions to userland and 
let the driver decide which ones to accelerate by hardware... before we 
know it we have half a GDI in the kernel. On the other hand - we 
already do, there's just no abstraction layer to make it accessible 
from outside.
These could be:
- - copy a buffer of pixel data into a rectangle in the framebuffer, 
maybe with optional 1bit->screen depth expansion
- - screen-to-screen copy
- - fill a rectangle
All these are either trivial or already implemented by either rasops or 
framebuffer drivers.
An API for hardware cursors is already in place, just not implemented 
by most drivers ( including mine... )
Most accelerated wsdisplay drivers have generic bitblt() and rectfill() 
functions, some also do colour expansion in hardware - at least mine 
do.

>>> - a flag to indicate whether or not colormap changes are accepted?
>>>   Not entirely necessary, but nice to have.
>>
>> Can't we check it by a return value of WSDISPLAYIO_GETCMAP or
>> WSDISPLAYIO_PUTCMAP?
>
> I agree with your suggestion here.

Seems the most sensible thing to do.

have fun
Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iQEVAwUBQkDQB8pnzkX8Yg2nAQI/5Qf/fbM6FIfas1UoQRFbB1XwJ68btEc8vSfL
ju6N5ZXaoAmCDKB3Pqocc4JcXnhsSlJl/GujLDKzRKPpdJIOBwaukA1CU3j2tbMf
MI8luA4EbSyzVOhtPm+4rt85tuGkiIYOMkzWK41hxjr/q9xapHgF5r94KYqdA7dx
RVIMwXzcwCwpTQsIRcXW1c9qtEhWopw1otkQA2+8meXuWxu9h3/6meGuXTpQ77gs
fLIHvA7RGC5vs+cCVGS+pB9lqGGSA2YrM9kA6UFGZnzAEpAhWOJWEfaXbDRfJcET
zvPtsFbn73LYfMjCnuAHvilAHNqOSE7CXicgMnoR4iVDeDjQ+qYXGg==
=iVwL
-----END PGP SIGNATURE-----