[PATCH] drm/mcde: Fix RGB/BGR bug

Sam Ravnborg sam at ravnborg.org
Mon Nov 23 16:59:04 EST 2020


Hi Linus.

On Tue, Nov 17, 2020 at 06:54:13PM +0100, Linus Walleij wrote:
> I was confused when the graphics came out with blue
> penguins on the DPI panel.
> 
> It turns out that the so-called "packed RGB666" mode
> on the DSI formatter is incorrect: this mode is the
> actual RGB888 mode, and the mode called RGB888 is
> BGR888.
> 
> The claims that the MCDE had inverse RGB/BGR buffer
> formats was wrong, so correct this and the buggy
> register and everything is much more consistent, and
> graphics look good on all targets, both DPI and
> DSI.
> 
> Cc: phone-devel at vger.kernel.org
> Cc: Stephan Gerhold <stephan at gerhold.net>
> Signed-off-by: Linus Walleij <linus.walleij at linaro.org>

Looks fine and seems to do what you write it should do.

I do not understand why this part:
>       case DRM_FORMAT_BGR888:
>               val |= MCDE_EXTSRCXCONF_BPP_RGB888 <<
>                       MCDE_EXTSRCXCONF_BPP_SHIFT;
> +             val |= MCDE_EXTSRCXCONF_BGR;
>               break;

does not use MCDE_EXTSRCXCONF_BPP_BGR888
But maybe there is no counterpart to MCDE_DSICONF0_PACKING_BGR888?

Assuming all is good despite my confusion:
Reviewed-by: Sam Ravnborg <sam at ravnborg.org>



More information about the linux-arm-kernel mailing list