FAILED: patch "[PATCH] drm/tiny: panel-mipi-dbi: Use drm_client_setup_with_fourcc()" failed to apply to 6.12-stable tree
[email protected]
maintainerThe 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 <[email protected]>.
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 '<[email protected]>' --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 <[email protected]>
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.
drivers/gpu/drm/tiny/panel-mipi-dbi.c +4 -1
@@ -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,
Quoted 6 lines · On Monday, May 19, 2025 09:00 -03, <[email protected]> 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 <[email protected]>.
Quoted 8 lines
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 checkoutFETCH_HEAD
git cherry-pick -x9c1798259b9420f38f1fa1b83e3d864c3eb1a83e
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --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 <[email protected]> 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.
commit 1b0caa5f5ac20bcaf82fc89a5c849b21ce3bfdf6
Author: Thomas Zimmermann <[email protected]> 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
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
Greg KH
maintainerQuoted 53 lines · Fabio Estevam
Hi Greg and Thomas,
Quoted 6 lines · On Monday, May 19, 2025 09:00 -03, <[email protected]> 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 <[email protected]>.Quoted 8 lines
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 checkoutFETCH_HEAD
git cherry-pick -x9c1798259b9420f38f1fa1b83e3d864c3eb1a83e
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --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
8998eedda2539d2528cfebdc7c17eed0ad35b714Author: Thomas Zimmermann <[email protected]> Date: Tue Sep 24 09:12:03 2024 +0200drm/fbdev-dma: Support struct drm_driver.fbdev_probe
Rework fbdev probing to support
fbdev_probein structdrm_driverand reimplement the oldfb_probecallback on top of it. Provide an initializer macro for structdrm_driverthat 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 <[email protected]>Reviewed-by Javier Martinez Canillas <[email protected]>commit
1b0caa5f5ac20bcaf82fc89a5c849b21ce3bfdf6Author: Thomas Zimmermann <[email protected]> Date: Tue Sep 24 09:12:29 2024 +0200drm/panel-mipi-dbi: Run DRM default client setup
Call
drm_client_setup()to run the kernel's default client setup for DRM. Setfbdev_probein structdrm_driver, so that the client setup can start the common fbdev client.v5:
- selectDRM_CLIENT_SELECTION
Quoted 6 lines
Signed-off-by Thomas Zimmermann <[email protected]>Cc "Noralf Trønnes" <[email protected]>Acked-by Noralf Trønnes <[email protected]>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,
Quoted 1 line · Greg KH
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