Skip to contentSkip to conversation

drm/imx: parallel-display: Prefer bus format set via legacy "interface-pix-fmt" DT property

PATCH Applied Marek Vasut 2 participants 5 messages Jan 10 – Mar 13

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/imx: parallel-display: Prefer bus format set via legacy "interface-pix-fmt" DT property

Prefer bus format set via legacy "interface-pix-fmt" DT property over panel bus format. This is necessary to retain support for DTs which configure the IPUv3 parallel output as 24bit DPI, but connect 18bit DPI panels to it with hardware swizzling.

This used to work up to Linux 6.12, but stopped working in 6.13, reinstate the behavior to support old DTs.

Fixes 5f6e56d3319d ("drm/imx: parallel-display: switch to drm_panel_bridge")

---
Cc: David Airlie <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Pengutronix Kernel Team <[email protected]>
Cc: Philipp Zabel <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Shawn Guo <[email protected]>
Cc: Simona Vetter <[email protected]>
Cc: Thomas Zimmermann <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]

---
 drivers/gpu/drm/imx/ipuv3/parallel-display.c | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)
drivers/gpu/drm/imx/ipuv3/parallel-display.c +12 -3
index 6fbf505d2801d..02bb38a1ee4eb 100644
@@ -110,8 +110,7 @@ imx_pd_bridge_atomic_get_input_bus_fmts(struct drm_bridge *bridge,
 		output_fmt = imxpd->bus_format ? : MEDIA_BUS_FMT_RGB888_1X24;
 
 	/* Now make sure the requested output format is supported. */
-	if ((imxpd->bus_format && imxpd->bus_format != output_fmt) ||
-	    !imx_pd_format_supported(output_fmt)) {
+	if (!imx_pd_format_supported(output_fmt)) {
 		*num_input_fmts = 0;
 		return NULL;
 	}
@@ -121,7 +120,17 @@ imx_pd_bridge_atomic_get_input_bus_fmts(struct drm_bridge *bridge,
 	if (!input_fmts)
 		return NULL;
 
-	input_fmts[0] = output_fmt;
+	/*
+	 * Prefer bus format set via legacy "interface-pix-fmt" DT property
+	 * over panel bus format. This is necessary to retain support for
+	 * DTs which configure the IPUv3 parallel output as 24bit, but
+	 * connect 18bit DPI panels to it with hardware swizzling.
+	 */
+	if (imxpd->bus_format && imxpd->bus_format != output_fmt)
+		input_fmts[0] = imxpd->bus_format;
+	else
+		input_fmts[0] = output_fmt;
+
 	return input_fmts;
 }
 
Signature · 1 line
2.51.0
maintainer Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Marek Vasut

Prefer bus format set via legacy "interface-pix-fmt" DT property over panel bus format. This is necessary to retain support for DTs which configure the IPUv3 parallel output as 24bit DPI, but connect 18bit DPI panels to it with hardware swizzling.

This used to work up to Linux 6.12, but stopped working in 6.13, reinstate the behavior to support old DTs.

Fixes 5f6e56d3319d ("drm/imx: parallel-display: switch to drm_panel_bridge")

regards
Philipp

#2 lore raw
Quoted 6 lines · Philipp Zabel
Quoted 5 lines · Marek Vasut

Prefer bus format set via legacy "interface-pix-fmt" DT property over panel bus format. This is necessary to retain support for DTs which configure the IPUv3 parallel output as 24bit DPI, but connect 18bit DPI panels to it with hardware swizzling.

Quoted 8 lines
Quoted 6 lines

This used to work up to Linux 6.12, but stopped working in 6.13, reinstate the behavior to support old DTs.

Fixes 5f6e56d3319d ("drm/imx: parallel-display: switch to drm_panel_bridge")

If there are no objections, would it be OK to apply this ?

maintainer Applied
#3 lore raw
In reply to Marek Vasut
Quoted 11 lines · Marek Vasut

Prefer bus format set via legacy "interface-pix-fmt" DT property over panel bus format. This is necessary to retain support for DTs which configure the IPUv3 parallel output as 24bit DPI, but connect 18bit DPI panels to it with hardware swizzling.

This used to work up to Linux 6.12, but stopped working in 6.13, reinstate the behavior to support old DTs.

Fixes 5f6e56d3319d ("drm/imx: parallel-display: switch to drm_panel_bridge")

Applied to drm-misc-next, thanks!

[1/1] drm/imx: parallel-display: Prefer bus format set via legacy "interface-pix-fmt" DT property

      commit: cdf26e1462c220629bb79d487263b66f8b679eab

regards
Philipp

#4 lore raw
Quoted 6 lines · Philipp Zabel
Quoted 5 lines · Marek Vasut

Prefer bus format set via legacy "interface-pix-fmt" DT property over panel bus format. This is necessary to retain support for DTs which configure the IPUv3 parallel output as 24bit DPI, but connect 18bit DPI panels to it with hardware swizzling.

Quoted 8 lines
Quoted 6 lines

This used to work up to Linux 6.12, but stopped working in 6.13, reinstate the behavior to support old DTs.

Fixes 5f6e56d3319d ("drm/imx: parallel-display: switch to drm_panel_bridge")

Applied to drm-misc-next, thanks!

Thank you