Bug#825840: localechooser: image display inverts red and blue color
Hi Samuel,
On Tue, Sep 6, 2016 at 2:32 AM, Samuel Thibault <sthibault@debian.org> wrote:
> Control: reassign -1 linux
>
> Mathieu Malaterre, on Mon 05 Sep 2016 07:26:15 +0200, wrote:
>> Frame buffer device information:
>> Name : OFfb ATY,RockHo
>> Address : 0x9c008000
>> Size : 614400
>> Type : PACKED PIXELS
>> Visual : PSEUDOCOLOR
>
>> Frame buffer device information:
>> Name : ATI Radeon 5962
>> Address : 0x98000000
>> Size : 33554432
>> Type : PACKED PIXELS
>> Visual : PSEUDOCOLOR
>
> Ok, so they look very similar. However, one thing that is different
> is the way they handle FBIOPUTCMAP, i.e. offb_setcolreg(). ATY,RockHo
> is not actually recognized by the offb driver, and it reverts to
> "cmap_simple", which may not actually be the proper way for RockHo, and
> it might very well be simply setting rgb in the wrong order. You could
> try to patch this over in there: turn
>
> case cmap_simple:
> writeb(regno, par->cmap_adr);
> writeb(red, par->cmap_data);
> writeb(green, par->cmap_data);
> writeb(blue, par->cmap_data);
> break;
>
> into
>
> case cmap_simple:
> writeb(regno, par->cmap_adr);
> writeb(blue, par->cmap_data);
> writeb(green, par->cmap_data);
> writeb(red, par->cmap_data);
> break;
>
> I really don't think it's a bterm bug, its only change of behavior is
> when type or visual changes, which is not the case. It however does
> use FBIOPUTCMAP, whose implementation does seem suspicious in offb for
> RockHo.
I did initially look into that direction (see the early bug report).
However when I realized that other TERM did not have the color
inversion I suspected that bterm was assuming BGR instead of RGB.
I will try your suggested patch, but I fear it will break every single
other TERM out there (at least in assumption of color organisation).
-M
PS: I'll send the screenshots separately.
Reply to: