Re: [PATCH 1/2] ARM S3C2410 framebuffer driver
From: "Antonino A. Daplas" <adaplas@gmail.com>
Date: 2005-09-05 01:24:20
Arnaud Patard (Rtp) wrote:
"Antonino A. Daplas" [off-list ref] writes:
I noticed one more thing:
+ if (var->bits_per_pixel == 16) {
+ var->red.offset = 11;
+ var->green.offset = 5;
+ var->blue.offset = 0;
+ var->red.length = 5;
+ var->green.length = 6;
+ var->blue.length = 5;
+ var->transp.length = 0;
+ } else {
+ var->red.length = 8;
+ var->red.offset = 0;
+ var->green.length = 8;
+ var->green.offset = 0;
+ var->blue.length = 8;
+ var->blue.offset = 0;
+ var->transp.length = 0;
+ }Your driver supports bits_per_pixel of 1, 2, 4 and 8. It will be more correct if you do the above like this: var->red.length = var->bits_per_pixel; var->red.offset = 0; var->green.length = var->bits_per_pixel; var->green.offset = 0; var->blue.length = var->bits_per_pixel; var->blue.offset = 0; Otherwise, your driver will get wrong colors at bpp of 1 and 2 with fbcon. If you believe the above is correct, I'll do the correction in my tree and you need not send a patch. Tony ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf