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

From: Benjamin Herrenschmidt
Date: Mon Jun 16 2014 - 03:35:59 EST


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.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/