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

2014-06-17 Thread Takashi Iwai
At Tue, 17 Jun 2014 09:54:07 +1000, Benjamin Herrenschmidt wrote: > > On Mon, 2014-06-16 at 17:35 +1000, Benjamin Herrenschmidt wrote: > > > 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

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

2014-06-17 Thread Takashi Iwai
At Tue, 17 Jun 2014 09:54:07 +1000, Benjamin Herrenschmidt wrote: On Mon, 2014-06-16 at 17:35 +1000, Benjamin Herrenschmidt wrote: 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... So

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

2014-06-16 Thread Benjamin Herrenschmidt
On Mon, 2014-06-16 at 17:35 +1000, Benjamin Herrenschmidt wrote: > 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... So the conclusion of further investigation is: - The right fix is to fix

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

2014-06-16 Thread Benjamin Herrenschmidt
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; > +

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

2014-06-16 Thread Benjamin Herrenschmidt
On Wed, 2014-05-14 at 19:57 +0200, Takashi Iwai wrote: > > Hm, so it actually regressed on BE? > > It's strange because fb_math_be() should be true and the patch won't > change the values in that case... Shouldn't the patch be based on foreign endian being set rather than just "be" anyway ?

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

2014-06-16 Thread Benjamin Herrenschmidt
On Wed, 2014-05-14 at 19:57 +0200, Takashi Iwai wrote: > > Hm, so it actually regressed on BE? > > It's strange because fb_math_be() should be true and the patch won't > change the values in that case... Shouldn't the patch be based on foreign endian being set rather than just "be" anyway ?

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

2014-06-16 Thread Benjamin Herrenschmidt
On Wed, 2014-05-14 at 19:57 +0200, Takashi Iwai wrote: Hm, so it actually regressed on BE? It's strange because fb_math_be() should be true and the patch won't change the values in that case... Shouldn't the patch be based on foreign endian being set rather than just be anyway ? IE. If

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

2014-06-16 Thread Benjamin Herrenschmidt
On Wed, 2014-05-14 at 19:57 +0200, Takashi Iwai wrote: Hm, so it actually regressed on BE? It's strange because fb_math_be() should be true and the patch won't change the values in that case... Shouldn't the patch be based on foreign endian being set rather than just be anyway ? IE. If

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

2014-06-16 Thread Benjamin Herrenschmidt
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; +

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

2014-06-16 Thread Benjamin Herrenschmidt
On Mon, 2014-06-16 at 17:35 +1000, Benjamin Herrenschmidt wrote: 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... So the conclusion of further investigation is: - The right fix is to fix

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

2014-05-14 Thread Takashi Iwai
At Wed, 14 May 2014 19:04:00 +0200, Cedric Le Goater wrote: > > On 05/14/2014 04:24 PM, Takashi Iwai wrote: > > At Wed, 14 May 2014 16:01:17 +0200, > > Cedric Le Goater wrote: > >> > >> Hi Iwai-san, > >> > >> On 05/14/2014 03:21 PM, Takashi Iwai wrote: > >>> Although the color palette was

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

2014-05-14 Thread Cedric Le Goater
On 05/14/2014 04:24 PM, Takashi Iwai wrote: > At Wed, 14 May 2014 16:01:17 +0200, > Cedric Le Goater wrote: >> >> Hi Iwai-san, >> >> On 05/14/2014 03:21 PM, Takashi Iwai wrote: >>> Although the color palette was corrected for little endian by the >>> commit [e1edf18b: offb: Add palette hack for

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

2014-05-14 Thread Geert Uytterhoeven
On Wed, May 14, 2014 at 4:01 PM, Cedric Le Goater 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

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

2014-05-14 Thread Takashi Iwai
At Wed, 14 May 2014 16:01:17 +0200, Cedric Le Goater wrote: > > Hi Iwai-san, > > On 05/14/2014 03:21 PM, Takashi Iwai wrote: > > Although the color palette was corrected for little endian by the > > commit [e1edf18b: offb: Add palette hack for little endian], the > > graphics mode is still

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

2014-05-14 Thread Cedric Le Goater
Hi Iwai-san, On 05/14/2014 03:21 PM, Takashi Iwai wrote: > Although the color palette was corrected for little endian by the > commit [e1edf18b: offb: Add palette hack for little endian], the > graphics mode is still shown in psychedelic colors. Are you referring to the linux logo colors ? If

[PATCH] offb: Fix little-endian support

2014-05-14 Thread Takashi Iwai
Although the color palette was corrected for little endian by the commit [e1edf18b: offb: Add palette hack for little endian], the graphics mode is still shown in psychedelic colors. For fixing this properly, we rather need to correct the RGB offsets depending on endianess. Since the RGB base

[PATCH] offb: Fix little-endian support

2014-05-14 Thread Takashi Iwai
Although the color palette was corrected for little endian by the commit [e1edf18b: offb: Add palette hack for little endian], the graphics mode is still shown in psychedelic colors. For fixing this properly, we rather need to correct the RGB offsets depending on endianess. Since the RGB base

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

2014-05-14 Thread Cedric Le Goater
Hi Iwai-san, On 05/14/2014 03:21 PM, Takashi Iwai wrote: Although the color palette was corrected for little endian by the commit [e1edf18b: offb: Add palette hack for little endian], the graphics mode is still shown in psychedelic colors. Are you referring to the linux logo colors ? If

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

2014-05-14 Thread Takashi Iwai
At Wed, 14 May 2014 16:01:17 +0200, Cedric Le Goater wrote: Hi Iwai-san, On 05/14/2014 03:21 PM, Takashi Iwai wrote: Although the color palette was corrected for little endian by the commit [e1edf18b: offb: Add palette hack for little endian], the graphics mode is still shown in

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

2014-05-14 Thread Geert Uytterhoeven
On Wed, May 14, 2014 at 4:01 PM, Cedric Le Goater c...@fr.ibm.com 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);

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

2014-05-14 Thread Cedric Le Goater
On 05/14/2014 04:24 PM, Takashi Iwai wrote: At Wed, 14 May 2014 16:01:17 +0200, Cedric Le Goater wrote: Hi Iwai-san, On 05/14/2014 03:21 PM, Takashi Iwai wrote: Although the color palette was corrected for little endian by the commit [e1edf18b: offb: Add palette hack for little endian],

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

2014-05-14 Thread Takashi Iwai
At Wed, 14 May 2014 19:04:00 +0200, Cedric Le Goater wrote: On 05/14/2014 04:24 PM, Takashi Iwai wrote: At Wed, 14 May 2014 16:01:17 +0200, Cedric Le Goater wrote: Hi Iwai-san, On 05/14/2014 03:21 PM, Takashi Iwai wrote: Although the color palette was corrected for little endian