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

From: Geert Uytterhoeven
Date: Wed May 14 2014 - 12:56:27 EST


On Wed, May 14, 2014 at 4:01 PM, Cedric Le Goater <clg@xxxxxxxxxx> wrote:
> --- linux.git.orig/drivers/video/fbmem.c
> +++ linux.git/drivers/video/fbmem.c
> @@ -252,7 +252,8 @@ static void fb_set_logo_truepalette(str
> blueshift = info->var.blue.offset - (8 - info->var.blue.length);
>
> for ( i = 0; i < logo->clutsize; i++) {
> - palette[i+32] = (safe_shift((clut[0] & redmask), redshift) |
> + palette[i+32] = fb_cmap_byteswap(info,
> + safe_shift((clut[0] & redmask), redshift) |
> safe_shift((clut[1] & greenmask), greenshift) |
> safe_shift((clut[2] & bluemask), blueshift));
> clut += 3;
> @@ -271,7 +272,8 @@ static void fb_set_logo_directpalette(st
> blueshift = info->var.blue.offset;
>
> for (i = 32; i < 32 + logo->clutsize; i++)
> - palette[i] = i << redshift | i << greenshift | i << blueshift;
> + palette[i] = fb_cmap_byteswap(info, i << redshift |
> + i << greenshift | i << blueshift);

I find it very strange you have to touch the generic code in such a way...

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/