[PATCH v2] drm/tiny: panel-mipi-dbi: Use drm_client_setup_with_fourcc()

Thomas Zimmermann tzimmermann at suse.de
Mon May 12 06:58:29 UTC 2025



Am 09.05.25 um 13:06 schrieb Fabio Estevam:
> Hi Javier and Thomas,
>
> On Tue, Apr 22, 2025 at 6:53 PM Javier Martinez Canillas
> <javierm at redhat.com> wrote:
>> Fabio Estevam <festevam at gmail.com> writes:
>>
>> Hello Fabio,
>>
>>> From: Fabio Estevam <festevam at denx.de>
>>>
>>> Since commit 559358282e5b ("drm/fb-helper: Don't use the preferred depth
>>> for the BPP default"), RGB565 displays such as the CFAF240320X no longer
>>> render correctly: colors are distorted and the content is shown twice
>>> horizontally.
>>>
>>> This regression is due to the fbdev emulation layer defaulting to 32 bits
>>> per pixel, whereas the display expects 16 bpp (RGB565). As a result, the
>>> framebuffer data is incorrectly interpreted by the panel.
>>>
>>> Fix the issue by calling drm_client_setup_with_fourcc() with a format
>>> explicitly selected based on the display's bits-per-pixel value. For 16
>>> bpp, use DRM_FORMAT_RGB565; for other values, fall back to the previous
>>> behavior. This ensures that the allocated framebuffer format matches the
>>> hardware expectations, avoiding color and layout corruption.
>>>
>>> Tested on a CFAF240320X display with an RGB565 configuration, confirming
>>> correct colors and layout after applying this patch.
>>>
>>> Cc: stable at vger.kernel.org
>>> Fixes: 559358282e5b ("drm/fb-helper: Don't use the preferred depth for the BPP default")
>>> Signed-off-by: Fabio Estevam <festevam at denx.de>
>>> Reviewed-by: Thomas Zimmermann <tzimmermann at suse.de>
>>> ---
>> Reviewed-by: Javier Martinez Canillas <javierm at redhat.com>
> Could you please help apply this fix?

Merged into drm-misc-fixes

Best regards
Thomas

>
> Thanks

-- 
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)



More information about the dri-devel mailing list