* [PATCH v1 0/4] drm: mxsfb: Support LCDIF interface pixel format
@ 2026-07-17 12:18 Francesco Dolcini
2026-07-17 12:18 ` [PATCH v1 1/4] dt-bindings: lcdif: Add " Francesco Dolcini
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Francesco Dolcini @ 2026-07-17 12:18 UTC (permalink / raw)
To: Marek Vasut, Stefan Agner, David Airlie, Simona Vetter,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam
Cc: Francesco Dolcini, dri-devel, devicetree, linux-kernel, imx,
linux-arm-kernel
From: Francesco Dolcini <francesco.dolcini@toradex.com>
The LCDIF data bus format describes how color component bits are assigned
to the physical LCD_DATA pins. This is a property of the LCDIF-to-display
wiring and can differ from the input format advertised by the downstream
panel or bridge.
Such a distinction is required when a narrower LCDIF bus is connected to
a wider display interface. For example, an 18-bit or 16-bit LCDIF bus can
drive a 24-bit display by wiring the available color bits to the
appropriate display inputs. Configuring LCDIF from the display's 24-bit
format in this case selects the wrong LCD_DATABUS_WIDTH mode, changing the
color-bit assignment on the LCD_DATA pins and resulting in incorrect
colors.
Add the optional interface-pix-fmt property to the LCDIF binding and make
the mxsfb driver use it in preference to the format reported by the
downstream display. When the property is absent, the existing behavior is
preserved.
This follows the approach already used by the i.MX IPUv3 parallel display
driver in drivers/gpu/drm/imx/ipuv3/parallel-display.c.
Set the interface format for the Colibri iMX6ULL and Colibri iMX7 boards,
which route an 18-bit LCD interface.
Francesco Dolcini (4):
dt-bindings: lcdif: Add interface pixel format
drm: mxsfb: Allow optional LCDIF interface format override
ARM: dts: imx6ull-colibri: Set LCDIF format
ARM: dts: imx7-colibri: Set LCDIF format
.../devicetree/bindings/display/fsl,lcdif.yaml | 7 +++++++
arch/arm/boot/dts/nxp/imx/imx6ull-colibri.dtsi | 1 +
arch/arm/boot/dts/nxp/imx/imx7-colibri.dtsi | 1 +
drivers/gpu/drm/mxsfb/mxsfb_drv.c | 16 ++++++++++++++++
drivers/gpu/drm/mxsfb/mxsfb_drv.h | 2 ++
drivers/gpu/drm/mxsfb/mxsfb_kms.c | 8 ++++++++
6 files changed, 35 insertions(+)
--
2.47.3
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v1 1/4] dt-bindings: lcdif: Add interface pixel format
2026-07-17 12:18 [PATCH v1 0/4] drm: mxsfb: Support LCDIF interface pixel format Francesco Dolcini
@ 2026-07-17 12:18 ` Francesco Dolcini
2026-07-17 12:28 ` sashiko-bot
2026-07-17 12:18 ` [PATCH v1 2/4] drm: mxsfb: Allow optional LCDIF interface format override Francesco Dolcini
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Francesco Dolcini @ 2026-07-17 12:18 UTC (permalink / raw)
To: Marek Vasut, Stefan Agner, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam
Cc: Francesco Dolcini, dri-devel, devicetree, linux-kernel, imx,
linux-arm-kernel
From: Francesco Dolcini <francesco.dolcini@toradex.com>
LCDIF has a hardware-configurable LCD_DATABUS_WIDTH field which selects
the parallel data bus transfer width. The selected mode changes how color
component bits are assigned to the LCD_DATA pins.
This must match the board wiring. On Colibri iMX6ULL, for example, only
18 LCD data lines are routed. A 24-bit panel can still be connected by
wiring the available LCD_DATA signals to the appropriate panel inputs.
Without describing the resulting interface format, LCDIF may assign the
color components to different data lines, causing shifted colors.
Add interface-pix-fmt so the binding can describe the configured LCDIF
bus format. The same property is already used by
display/imx/fsl,imx-parallel-display.yaml.
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
---
Documentation/devicetree/bindings/display/fsl,lcdif.yaml | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/Documentation/devicetree/bindings/display/fsl,lcdif.yaml b/Documentation/devicetree/bindings/display/fsl,lcdif.yaml
index 2dd0411ec651..209ee5a96e39 100644
--- a/Documentation/devicetree/bindings/display/fsl,lcdif.yaml
+++ b/Documentation/devicetree/bindings/display/fsl,lcdif.yaml
@@ -58,6 +58,13 @@ properties:
items:
- const: rx
+ interface-pix-fmt:
+ $ref: /schemas/types.yaml#/definitions/string
+ enum:
+ - rgb24
+ - rgb565
+ - rgb666
+
interrupts:
items:
- description: LCDIF DMA interrupt
--
2.47.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v1 2/4] drm: mxsfb: Allow optional LCDIF interface format override
2026-07-17 12:18 [PATCH v1 0/4] drm: mxsfb: Support LCDIF interface pixel format Francesco Dolcini
2026-07-17 12:18 ` [PATCH v1 1/4] dt-bindings: lcdif: Add " Francesco Dolcini
@ 2026-07-17 12:18 ` Francesco Dolcini
2026-07-17 12:18 ` [PATCH v1 3/4] ARM: dts: imx6ull-colibri: Set LCDIF format Francesco Dolcini
2026-07-17 12:18 ` [PATCH v1 4/4] ARM: dts: imx7-colibri: " Francesco Dolcini
3 siblings, 0 replies; 8+ messages in thread
From: Francesco Dolcini @ 2026-07-17 12:18 UTC (permalink / raw)
To: Marek Vasut, Stefan Agner, David Airlie, Simona Vetter,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam
Cc: Francesco Dolcini, dri-devel, devicetree, linux-kernel, imx,
linux-arm-kernel
From: Francesco Dolcini <francesco.dolcini@toradex.com>
LCDIF programs LCD_DATABUS_WIDTH from the selected media bus format. The
format reported by the downstream panel or bridge describes the display
input, but it does not describe how the LCDIF data pins are physically
wired on the board.
These can differ. For example, a 16-bit LCDIF bus can be connected to a
24-bit display by wiring the available color bits to the corresponding
display inputs. In that case, using the display's 24-bit format to
configure LCDIF selects the wrong data-bus mode and changes the assignment
of color bits on the LCD_DATA pins.
Read the optional interface-pix-fmt property from the LCDIF node and use
it to select the media bus format used to configure LCDIF. This allows
the LCDIF bus mode to describe the physical interface independently of
the downstream display format.
When the optional property is absent, continue using the format reported
by the downstream display device, preserving the existing behavior.
This follows the same approach already implemented in
drivers/gpu/drm/imx/ipuv3/parallel-display.c.
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
---
drivers/gpu/drm/mxsfb/mxsfb_drv.c | 16 ++++++++++++++++
drivers/gpu/drm/mxsfb/mxsfb_drv.h | 2 ++
drivers/gpu/drm/mxsfb/mxsfb_kms.c | 8 ++++++++
3 files changed, 26 insertions(+)
diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
index 9b8fbda85d28..edf347968fd2 100644
--- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c
+++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
@@ -12,7 +12,9 @@
#include <linux/clk.h>
#include <linux/dma-mapping.h>
#include <linux/io.h>
+#include <linux/media-bus-format.h>
#include <linux/module.h>
+#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/property.h>
#include <linux/pm_runtime.h>
@@ -209,7 +211,10 @@ static int mxsfb_load(struct drm_device *drm,
const struct mxsfb_devdata *devdata)
{
struct platform_device *pdev = to_platform_device(drm->dev);
+ struct device_node *np = pdev->dev.of_node;
struct mxsfb_drm_private *mxsfb;
+ u32 bus_format = 0;
+ const char *fmt;
int ret;
mxsfb = devm_kzalloc(&pdev->dev, sizeof(*mxsfb), GFP_KERNEL);
@@ -236,6 +241,17 @@ static int mxsfb_load(struct drm_device *drm,
if (IS_ERR(mxsfb->clk_disp_axi))
mxsfb->clk_disp_axi = NULL;
+ ret = of_property_read_string(np, "interface-pix-fmt", &fmt);
+ if (!ret) {
+ if (!strcmp(fmt, "rgb24"))
+ bus_format = MEDIA_BUS_FMT_RGB888_1X24;
+ else if (!strcmp(fmt, "rgb565"))
+ bus_format = MEDIA_BUS_FMT_RGB565_1X16;
+ else if (!strcmp(fmt, "rgb666"))
+ bus_format = MEDIA_BUS_FMT_RGB666_1X18;
+ }
+ mxsfb->bus_format = bus_format;
+
ret = dma_set_mask_and_coherent(drm->dev, DMA_BIT_MASK(32));
if (ret)
return ret;
diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.h b/drivers/gpu/drm/mxsfb/mxsfb_drv.h
index d160d921b25f..f64800f06a69 100644
--- a/drivers/gpu/drm/mxsfb/mxsfb_drv.h
+++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.h
@@ -46,6 +46,8 @@ struct mxsfb_drm_private {
struct drm_connector *connector;
struct drm_bridge *bridge;
+ u32 bus_format;
+
bool crc_active;
};
diff --git a/drivers/gpu/drm/mxsfb/mxsfb_kms.c b/drivers/gpu/drm/mxsfb/mxsfb_kms.c
index d8ebebc5314b..8b482727aed5 100644
--- a/drivers/gpu/drm/mxsfb/mxsfb_kms.c
+++ b/drivers/gpu/drm/mxsfb/mxsfb_kms.c
@@ -386,6 +386,14 @@ static void mxsfb_crtc_atomic_enable(struct drm_crtc *crtc,
if (!bus_format)
bus_format = MEDIA_BUS_FMT_RGB888_1X24;
+ /*
+ * Prefer bus format set via optional "interface-pix-fmt" DT property,
+ * over panel or next bridge bus format. This is necessary to support
+ * 24bit DPI panels connected to a 18bit interface, for example.
+ */
+ if (mxsfb->bus_format)
+ bus_format = mxsfb->bus_format;
+
mxsfb_crtc_mode_set_nofb(mxsfb, bridge_state, bus_format);
/* Write cur_buf as well to avoid an initial corrupt frame */
--
2.47.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v1 3/4] ARM: dts: imx6ull-colibri: Set LCDIF format
2026-07-17 12:18 [PATCH v1 0/4] drm: mxsfb: Support LCDIF interface pixel format Francesco Dolcini
2026-07-17 12:18 ` [PATCH v1 1/4] dt-bindings: lcdif: Add " Francesco Dolcini
2026-07-17 12:18 ` [PATCH v1 2/4] drm: mxsfb: Allow optional LCDIF interface format override Francesco Dolcini
@ 2026-07-17 12:18 ` Francesco Dolcini
2026-07-17 12:18 ` [PATCH v1 4/4] ARM: dts: imx7-colibri: " Francesco Dolcini
3 siblings, 0 replies; 8+ messages in thread
From: Francesco Dolcini @ 2026-07-17 12:18 UTC (permalink / raw)
To: Marek Vasut, Stefan Agner, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam
Cc: Francesco Dolcini, dri-devel, devicetree, linux-kernel, imx,
linux-arm-kernel
From: Francesco Dolcini <francesco.dolcini@toradex.com>
The lcd DPI interface on colibri imx6ull uses a 18-bit width bus, set
the interface-pix-fmt accordingly.
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
---
arch/arm/boot/dts/nxp/imx/imx6ull-colibri.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/boot/dts/nxp/imx/imx6ull-colibri.dtsi b/arch/arm/boot/dts/nxp/imx/imx6ull-colibri.dtsi
index ec3c1e7301f4..e126fade2304 100644
--- a/arch/arm/boot/dts/nxp/imx/imx6ull-colibri.dtsi
+++ b/arch/arm/boot/dts/nxp/imx/imx6ull-colibri.dtsi
@@ -225,6 +225,7 @@ &lcdif {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_lcdif_dat
&pinctrl_lcdif_ctrl>;
+ interface-pix-fmt = "rgb666";
status = "disabled";
port {
--
2.47.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v1 4/4] ARM: dts: imx7-colibri: Set LCDIF format
2026-07-17 12:18 [PATCH v1 0/4] drm: mxsfb: Support LCDIF interface pixel format Francesco Dolcini
` (2 preceding siblings ...)
2026-07-17 12:18 ` [PATCH v1 3/4] ARM: dts: imx6ull-colibri: Set LCDIF format Francesco Dolcini
@ 2026-07-17 12:18 ` Francesco Dolcini
2026-07-17 12:30 ` sashiko-bot
3 siblings, 1 reply; 8+ messages in thread
From: Francesco Dolcini @ 2026-07-17 12:18 UTC (permalink / raw)
To: Marek Vasut, Stefan Agner, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Frank Li, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam
Cc: Francesco Dolcini, dri-devel, devicetree, linux-kernel, imx,
linux-arm-kernel
From: Francesco Dolcini <francesco.dolcini@toradex.com>
The lcd DPI interface on colibri imx6ull uses a 18-bit width bus, set
the interface-pix-fmt accordingly.
Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com>
---
arch/arm/boot/dts/nxp/imx/imx7-colibri.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm/boot/dts/nxp/imx/imx7-colibri.dtsi b/arch/arm/boot/dts/nxp/imx/imx7-colibri.dtsi
index 8666dcd7fe97..f820a613109a 100644
--- a/arch/arm/boot/dts/nxp/imx/imx7-colibri.dtsi
+++ b/arch/arm/boot/dts/nxp/imx/imx7-colibri.dtsi
@@ -533,6 +533,7 @@ &lcdif {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_lcdif_dat
&pinctrl_lcdif_ctrl>;
+ interface-pix-fmt = "rgb666";
status = "disabled";
port {
--
2.47.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH v1 1/4] dt-bindings: lcdif: Add interface pixel format
2026-07-17 12:18 ` [PATCH v1 1/4] dt-bindings: lcdif: Add " Francesco Dolcini
@ 2026-07-17 12:28 ` sashiko-bot
2026-07-17 15:55 ` Frank Li
0 siblings, 1 reply; 8+ messages in thread
From: sashiko-bot @ 2026-07-17 12:28 UTC (permalink / raw)
To: Francesco Dolcini; +Cc: devicetree, robh, dri-devel, Frank.Li, conor+dt, imx
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Introduction of the legacy, non-standard `interface-pix-fmt` property for a standard hardware concept (parallel bus width), violating modern DT principles.
--
--- Patch [1]: [PATCH v1 1/4] dt-bindings: lcdif: Add interface pixel format ---
commit 7225ea545d2ff50540972dd75d375b8ecea4f315
Author: Francesco Dolcini <francesco.dolcini@toradex.com>
dt-bindings: lcdif: Add interface pixel format
This commit updates the fsl,lcdif device tree binding to support the
interface-pix-fmt property. The property is used to describe the hardware's
parallel data bus transfer width to match board wiring and prevent shifted
colors.
> diff --git a/Documentation/devicetree/bindings/display/fsl,lcdif.yaml b/Documentation/devicetree/bindings/display/fsl,lcdif.yaml
> index 2dd0411ec6516..209ee5a96e393 100644
> --- a/Documentation/devicetree/bindings/display/fsl,lcdif.yaml
> +++ b/Documentation/devicetree/bindings/display/fsl,lcdif.yaml
> @@ -58,6 +58,13 @@ properties:
> items:
> - const: rx
>
> + interface-pix-fmt:
> + $ref: /schemas/types.yaml#/definitions/string
> + enum:
> + - rgb24
> + - rgb565
> + - rgb666
[Severity: Low]
Is this introducing a legacy, non-standard property into the new schema ABI?
Standard devicetree guidelines usually prefer endpoint properties like
bus-width (defined in video-interfaces.yaml) to describe physical parallel
data line configurations, such as setting bus-width = <18> for RGB666.
If a custom property is strictly necessary here rather than using the standard
endpoint properties, does this require a vendor prefix like
fsl,interface-pix-fmt to comply with modern devicetree naming conventions?
> +
> interrupts:
> items:
> - description: LCDIF DMA interrupt
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260717121847.488148-1-francesco@dolcini.it?part=1
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1 4/4] ARM: dts: imx7-colibri: Set LCDIF format
2026-07-17 12:18 ` [PATCH v1 4/4] ARM: dts: imx7-colibri: " Francesco Dolcini
@ 2026-07-17 12:30 ` sashiko-bot
0 siblings, 0 replies; 8+ messages in thread
From: sashiko-bot @ 2026-07-17 12:30 UTC (permalink / raw)
To: Francesco Dolcini; +Cc: imx, robh, dri-devel, Frank.Li, conor+dt, devicetree
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The commit message body incorrectly refers to `colibri imx6ull` instead of `colibri imx7`.
--
--- Patch [4]: [PATCH v1 4/4] ARM: dts: imx7-colibri: Set LCDIF format ---
commit 9c45712860f8ad12db4bc3a18c8c4e7039c7f51b
Author: Francesco Dolcini <francesco.dolcini@toradex.com>
ARM: dts: imx7-colibri: Set LCDIF format
This commit updates the device tree for the Colibri i.MX7 to explicitly set
the LCDIF pixel format to rgb666 for its 18-bit width bus.
> The lcd DPI interface on colibri imx6ull uses a 18-bit width bus, set
> the interface-pix-fmt accordingly.
[Severity: Medium]
Is this description accurate for this patch? The subject and the modified
file (imx7-colibri.dtsi) both target the i.MX7 hardware, but the commit
message body mentions the colibri imx6ull. Should this text be updated to
refer to the i.MX7?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260717121847.488148-1-francesco@dolcini.it?part=4
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH v1 1/4] dt-bindings: lcdif: Add interface pixel format
2026-07-17 12:28 ` sashiko-bot
@ 2026-07-17 15:55 ` Frank Li
0 siblings, 0 replies; 8+ messages in thread
From: Frank Li @ 2026-07-17 15:55 UTC (permalink / raw)
To: sashiko-reviews
Cc: Francesco Dolcini, devicetree, robh, dri-devel, Frank.Li,
conor+dt, imx
On Fri, Jul 17, 2026 at 12:28:07PM +0000, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Low] Introduction of the legacy, non-standard `interface-pix-fmt` property for a standard hardware concept (parallel bus width), violating modern DT principles.
> --
>
> --- Patch [1]: [PATCH v1 1/4] dt-bindings: lcdif: Add interface pixel format ---
> commit 7225ea545d2ff50540972dd75d375b8ecea4f315
> Author: Francesco Dolcini <francesco.dolcini@toradex.com>
>
> dt-bindings: lcdif: Add interface pixel format
>
> This commit updates the fsl,lcdif device tree binding to support the
> interface-pix-fmt property. The property is used to describe the hardware's
> parallel data bus transfer width to match board wiring and prevent shifted
> colors.
>
> > diff --git a/Documentation/devicetree/bindings/display/fsl,lcdif.yaml b/Documentation/devicetree/bindings/display/fsl,lcdif.yaml
> > index 2dd0411ec6516..209ee5a96e393 100644
> > --- a/Documentation/devicetree/bindings/display/fsl,lcdif.yaml
> > +++ b/Documentation/devicetree/bindings/display/fsl,lcdif.yaml
> > @@ -58,6 +58,13 @@ properties:
> > items:
> > - const: rx
> >
> > + interface-pix-fmt:
> > + $ref: /schemas/types.yaml#/definitions/string
> > + enum:
> > + - rgb24
> > + - rgb565
> > + - rgb666
>
> [Severity: Low]
> Is this introducing a legacy, non-standard property into the new schema ABI?
>
> Standard devicetree guidelines usually prefer endpoint properties like
> bus-width (defined in video-interfaces.yaml) to describe physical parallel
> data line configurations, such as setting bus-width = <18> for RGB666.
Make sense, can we use standard property?
Frank
>
> If a custom property is strictly necessary here rather than using the standard
> endpoint properties, does this require a vendor prefix like
> fsl,interface-pix-fmt to comply with modern devicetree naming conventions?
>
> > +
> > interrupts:
> > items:
> > - description: LCDIF DMA interrupt
>
> --
> Sashiko AI review · https://sashiko.dev/#/patchset/20260717121847.488148-1-francesco@dolcini.it?part=1
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2026-07-17 15:56 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-17 12:18 [PATCH v1 0/4] drm: mxsfb: Support LCDIF interface pixel format Francesco Dolcini
2026-07-17 12:18 ` [PATCH v1 1/4] dt-bindings: lcdif: Add " Francesco Dolcini
2026-07-17 12:28 ` sashiko-bot
2026-07-17 15:55 ` Frank Li
2026-07-17 12:18 ` [PATCH v1 2/4] drm: mxsfb: Allow optional LCDIF interface format override Francesco Dolcini
2026-07-17 12:18 ` [PATCH v1 3/4] ARM: dts: imx6ull-colibri: Set LCDIF format Francesco Dolcini
2026-07-17 12:18 ` [PATCH v1 4/4] ARM: dts: imx7-colibri: " Francesco Dolcini
2026-07-17 12:30 ` sashiko-bot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.