Thread (5 messages) flat view 5 messages, 2 authors, 2004-07-14

Re: Re: HP300 support checked in

From: Antonino A. Daplas <hidden>
Date: 2004-07-14 07:32:57

On Monday 12 July 2004 15:25, Geert Uytterhoeven wrote:
On Sun, 11 Jul 2004, Kars de Jong wrote:
quoted
Support for <8 bit framebuffers is probably broken. I don't know how I'm
going to support them yet. It used to be "special-cased" in
drivers/video/fbcon.c.

They are laid out in memory like normal 8 bit chunky framebuffers, but
the upper bits are basically ignored.

So for blitting purposes the bits_per_pixel == 8 code should be used,
but just setting bits_per_pixel to 8 doesn't work because then the
amount of colours is assumed to be 256.

I think we basically need to distinguish between bpp and depth.
What are the possible values of depth? Just 1 (monochrome)? Or also 4 (16
colors)?

If it's just 1 (monochrome), you can probably get away with setting
var.bits_per_pixel = 256 and fix.visual = FB_VISUAL_MONO01 (or MONO10).
Or we can use the fields in var->green, var->red, var->blue, ie,  to describe a 4-color
8-bit chunky framebuffer:

var->red.length = 2;
var->red.offset = 0;
var->green = var->blue = var->red.
var->bits_per_pixel = 8;

We still need to fix fbcon to handle this type of framebuffers, since fbcon always assumes
a packed pixel format.  For instance, we have this kind of code in fbcon.c

vc->vc_can_do_color = (var->bits_per_pixel != 1) ? 1 : 0;

which is incorrect in this case. Better if we test fix->visual instead.

I'll see if I can create a test patch for this. 

Tony




-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help