The patch below does not apply to the 6.12-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to stable@vger.kernel.org.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.12.y git checkout FETCH_HEAD git cherry-pick -x 9c1798259b9420f38f1fa1b83e3d864c3eb1a83e # <resolve conflicts, build, test, etc.> git commit -s git send-email --to 'stable@vger.kernel.org' --in-reply-to '2025051936-qualify-waged-4677@gregkh' --subject-prefix 'PATCH 6.12.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 9c1798259b9420f38f1fa1b83e3d864c3eb1a83e Mon Sep 17 00:00:00 2001 From: Fabio Estevam festevam@denx.de Date: Thu, 17 Apr 2025 07:34:58 -0300 Subject: [PATCH] drm/tiny: panel-mipi-dbi: Use drm_client_setup_with_fourcc()
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@vger.kernel.org Fixes: 559358282e5b ("drm/fb-helper: Don't use the preferred depth for the BPP default") Signed-off-by: Fabio Estevam festevam@denx.de Reviewed-by: Thomas Zimmermann tzimmermann@suse.de Reviewed-by: Javier Martinez Canillas javierm@redhat.com Signed-off-by: Thomas Zimmermann tzimmermann@suse.de Link: https://lore.kernel.org/r/20250417103458.2496790-1-festevam@gmail.com
diff --git a/drivers/gpu/drm/tiny/panel-mipi-dbi.c b/drivers/gpu/drm/tiny/panel-mipi-dbi.c index 0460ecaef4bd..23914a9f7fd3 100644 --- a/drivers/gpu/drm/tiny/panel-mipi-dbi.c +++ b/drivers/gpu/drm/tiny/panel-mipi-dbi.c @@ -390,7 +390,10 @@ static int panel_mipi_dbi_spi_probe(struct spi_device *spi)
spi_set_drvdata(spi, drm);
- drm_client_setup(drm, NULL); + if (bpp == 16) + drm_client_setup_with_fourcc(drm, DRM_FORMAT_RGB565); + else + drm_client_setup_with_fourcc(drm, DRM_FORMAT_RGB888);
return 0; }
Hi Greg and Thomas,
On Monday, May 19, 2025 09:00 -03, gregkh@linuxfoundation.org wrote:
The patch below does not apply to the 6.12-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to stable@vger.kernel.org.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.12.y git checkout FETCH_HEAD git cherry-pick -x 9c1798259b9420f38f1fa1b83e3d864c3eb1a83e # <resolve conflicts, build, test, etc.> git commit -s git send-email --to 'stable@vger.kernel.org' --in-reply-to '2025051936-qualify-waged-4677@gregkh' --subject-prefix 'PATCH 6.12.y' HEAD^..
Locally, I am running 6.12 with these two extra dependencies applied:
commit 8998eedda2539d2528cfebdc7c17eed0ad35b714 Author: Thomas Zimmermann tzimmermann@suse.de Date: Tue Sep 24 09:12:03 2024 +0200
drm/fbdev-dma: Support struct drm_driver.fbdev_probe
Rework fbdev probing to support fbdev_probe in struct drm_driver and reimplement the old fb_probe callback on top of it. Provide an initializer macro for struct drm_driver that sets the callback according to the kernel configuration.
This change allows the common fbdev client to run on top of DMA- based DRM drivers.
Signed-off-by: Thomas Zimmermann tzimmermann@suse.de Reviewed-by: Javier Martinez Canillas javierm@redhat.com Link: https://patchwork.freedesktop.org/patch/msgid/20240924071734.98201-6-tzimmer...
commit 1b0caa5f5ac20bcaf82fc89a5c849b21ce3bfdf6 Author: Thomas Zimmermann tzimmermann@suse.de Date: Tue Sep 24 09:12:29 2024 +0200
drm/panel-mipi-dbi: Run DRM default client setup
Call drm_client_setup() to run the kernel's default client setup for DRM. Set fbdev_probe in struct drm_driver, so that the client setup can start the common fbdev client.
v5: - select DRM_CLIENT_SELECTION
Signed-off-by: Thomas Zimmermann tzimmermann@suse.de Cc: "Noralf Trønnes" noralf@tronnes.org Acked-by: Noralf Trønnes noralf@tronnes.org Link: https://patchwork.freedesktop.org/patch/msgid/20240924071734.98201-32-tzimme...
I have only tested panel-mipi-dbi (the only display available on the board I use). I am unsure if applying these extra patches to linux-6.12 stable is safe or if they could cause issues with other fbdev drivers.
Regards,
Fabio Estevam
On Mon, May 19, 2025 at 03:38:23PM +0200, Fabio Estevam wrote:
Hi Greg and Thomas,
On Monday, May 19, 2025 09:00 -03, gregkh@linuxfoundation.org wrote:
The patch below does not apply to the 6.12-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to stable@vger.kernel.org.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.12.y git checkout FETCH_HEAD git cherry-pick -x 9c1798259b9420f38f1fa1b83e3d864c3eb1a83e # <resolve conflicts, build, test, etc.> git commit -s git send-email --to 'stable@vger.kernel.org' --in-reply-to '2025051936-qualify-waged-4677@gregkh' --subject-prefix 'PATCH 6.12.y' HEAD^..
Locally, I am running 6.12 with these two extra dependencies applied:
commit 8998eedda2539d2528cfebdc7c17eed0ad35b714 Author: Thomas Zimmermann tzimmermann@suse.de Date: Tue Sep 24 09:12:03 2024 +0200
drm/fbdev-dma: Support struct drm_driver.fbdev_probe
Rework fbdev probing to support fbdev_probe in struct drm_driver and reimplement the old fb_probe callback on top of it. Provide an initializer macro for struct drm_driver that sets the callback according to the kernel configuration. This change allows the common fbdev client to run on top of DMA- based DRM drivers. Signed-off-by: Thomas Zimmermann tzimmermann@suse.de Reviewed-by: Javier Martinez Canillas javierm@redhat.com Link: https://patchwork.freedesktop.org/patch/msgid/20240924071734.98201-6-tzimmer...
commit 1b0caa5f5ac20bcaf82fc89a5c849b21ce3bfdf6 Author: Thomas Zimmermann tzimmermann@suse.de Date: Tue Sep 24 09:12:29 2024 +0200
drm/panel-mipi-dbi: Run DRM default client setup
Call drm_client_setup() to run the kernel's default client setup for DRM. Set fbdev_probe in struct drm_driver, so that the client setup can start the common fbdev client. v5: - select DRM_CLIENT_SELECTION Signed-off-by: Thomas Zimmermann tzimmermann@suse.de Cc: "Noralf Trønnes" noralf@tronnes.org Acked-by: Noralf Trønnes noralf@tronnes.org Link: https://patchwork.freedesktop.org/patch/msgid/20240924071734.98201-32-tzimme...
I have only tested panel-mipi-dbi (the only display available on the board I use). I am unsure if applying these extra patches to linux-6.12 stable is safe or if they could cause issues with other fbdev drivers.
Can you send these as a patch series for us to consider applying?
thanks,
greg k-h
Hi Greg,
On Monday, May 19, 2025 10:53 -03, Greg KH gregkh@linuxfoundation.org wrote:
Can you send these as a patch series for us to consider applying?
I have just submitted the three patches that fix the panel-mipi-dbi regression on 6.12.
Thanks
linux-stable-mirror@lists.linaro.org