Re: [PATCH] fbdev driver for S3 Trio/Virge, updated
From: "Antonino A. Daplas" <adaplas@gmail.com>
Date: 2007-02-28 21:33:27
Also in:
lkml
On Wed, 2007-02-28 at 16:53 +0000, James Simmons wrote:
quoted
On Thu, 2007-02-22 at 00:53 +0000, James Simmons wrote:quoted
quoted
quoted
+/* image data is MSB-first, fb structure is MSB-first too */ +static inline u32 expand_color(u32 c) +{ + return ((c & 1) | ((c & 2) << 7) | ((c & 4) << 14) | ((c & 8) << 21)) * 0xFF; +} + +/* s3fb_iplan_imageblit silently assumes that almost everything is 8-pixel aligned */Hmn, same thing with vga16fb... Perhaps we should bring back the fontwidth flag of 2.2 and 2.4 kernels.Ug no. It is possible to get 12,6 bit width fonts working with vga interleaved planes. I got it paritally working but never got back to it. Its in my queue of this to do. Now that I finished the display class I need to get around to makeing drm/fbdev work together :-)Of course, not fontwidth exactly, but to allow the driver to specify the alignment of the blit engine, in this case 8 pixels. I do believe X also has similar functionality to compensate for the limitation of the hardware.Isn't scan_align in pixmap for this? Or do we need more.
No, scan_align is how much to pad each line, and it's up to the engine to discard the padding. In this case, the hardware does not allow padding and must be given data in exact multiples. For example, vesafb can accept 4x4 fonts padded to 8x4, but vga16fb will not be able to draw 4x4 fonts properly. Tony