Thread (11 messages) 11 messages, 4 authors, 2014-06-17

Re: [PATCH] offb: Fix little-endian support

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2014-06-16 07:35:54
Also in: lkml

On Wed, 2014-05-14 at 15:21 +0200, Takashi Iwai wrote:
        case 16:                /* RGB 565 */
                var->bits_per_pixel = 16;
-               var->red.offset = 11;
+               if (fb_be_math(info)) {
+                       var->red.offset = 11;
+                       var->green.offset = 5;
+                       var->blue.offset = 0;
+               } else {
+                       var->red.offset = 0;
+                       var->green.offset = 5;
+                       var->blue.offset = 11;
+               }
                var->red.length = 5;
-               var->green.offset = 5;
                var->green.length = 6;
-               var->blue.offset = 0;
                var->blue.length = 5;
                var->transp.offset = 0;
                var->transp.length = 0;
                break;
I somewhat doubt that this (and 5:5:5) actually work, do they ? the
green gets split into two separate fields, which we can't express
properly here...

Cheers,
Ben.

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help