[...]
> +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.orgIn 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/