Messages in this thread | | | Date | Tue, 29 Jan 2002 10:39:21 +0100 (MET) | From | Geert Uytterhoeven <> | Subject | Re: [PATCH] fbdev accel wrapper. II |
| |
On Mon, 28 Jan 2002, James Simmons wrote: > Oops. Forgot the patch. Here you go. > > diff -urN -X /home/jsimmons/dontdiff linux-2.5.2-dj6/drivers/video/fbcon-accel.c linux/drivers/video/fbcon-accel.c > --- linux-2.5.2-dj6/drivers/video/fbcon-accel.c Wed Dec 31 16:00:00 1969 > +++ linux/drivers/video/fbcon-accel.c Mon Jan 28 11:15:10 2002
[...]
> +void fbcon_accel_clear(struct vc_data *vc, struct display *p, int sy, int sx, > + int height, int width) > +{ > + struct fb_info *info = p->fb_info; > + struct fb_fillrect region; > + > + if (info->fix.visual == FB_VISUAL_PSEUDOCOLOR) > + region.color = attr_bgcol_ec(p,vc); > + else { > + if (info->var.bits_per_pixel > 16) > + region.color = ((u32*)info->pseudo_palette)[attr_bgcol_ec(p,vc)]; > + else > + region.color = ((u16*)info->pseudo_palette)[attr_bgcol_ec(p,vc)]; > + }
What about non-pseudocolor modes with bpp <= 8? We still use the 16-bit wide pseudo-palette in that case?
Alternatively we can always use the 32-bit wide pseudo-palette, so the test for info->var.bits_per_pixel can go away (assumed there are no pixel sizes where more than 32 bits are needed for the color information). Then a pixel value is just an opaque 32-bit value (cfr. fbtest).
Gr{oetje,eeting}s,
Geert
-- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |