* [PATCH v3 0/3] drm/panel: add LXD M9189A
@ 2026-02-10 11:22 Michael Tretter
2026-02-10 11:22 ` [PATCH v3 1/3] dt-bindings: vendor-prefixes: Add lxd Michael Tretter
` (3 more replies)
0 siblings, 4 replies; 11+ messages in thread
From: Michael Tretter @ 2026-02-10 11:22 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Rouven Czerwinski,
Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter
Cc: devicetree, dri-devel, kernel, Michael Tretter,
Krzysztof Kozlowski
Add support for the LXD M9189A panel based on the EK79007AD3 DSI display
controller.
This series is based on the v2 by Rouven Czerwinski. Since I took over
the series, I changed the maintainer for the driver and bindings to
myself. Furthermore, I updated the device tree binding to use
panel-common.yaml as a base and fixed a compiler warning for the driver.
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
---
Changes in v3:
- Add cover letter
- Change maintainer to myself
- Use panel-common.yaml as base for dt binding
- Fix compiler warning about uninitialized variable
- Link to v2: https://patch.msgid.link/20241025141130.3179166-1-r.czerwinski@pengutronix.de
---
Rouven Czerwinski (3):
dt-bindings: vendor-prefixes: Add lxd
dt-bindings: display: panel: add YAML schema for LXD M9189A
drm/panel: add LXD M9189A panel driver
.../bindings/display/panel/lxd,m9189a.yaml | 63 ++++++
.../devicetree/bindings/vendor-prefixes.yaml | 2 +
MAINTAINERS | 6 +
drivers/gpu/drm/panel/Kconfig | 9 +
drivers/gpu/drm/panel/Makefile | 1 +
drivers/gpu/drm/panel/panel-lxd-m9189a.c | 243 +++++++++++++++++++++
6 files changed, 324 insertions(+)
---
base-commit: 05f7e89ab9731565d8a62e3b5d1ec206485eeb0b
change-id: 20260209-drm-panel-ek79007ad3-6009791add23
Best regards,
--
Michael Tretter <m.tretter@pengutronix.de>
^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v3 1/3] dt-bindings: vendor-prefixes: Add lxd
2026-02-10 11:22 [PATCH v3 0/3] drm/panel: add LXD M9189A Michael Tretter
@ 2026-02-10 11:22 ` Michael Tretter
2026-02-11 6:26 ` Claude review: " Claude Code Review Bot
2026-02-10 11:22 ` [PATCH v3 2/3] dt-bindings: display: panel: add YAML schema for LXD M9189A Michael Tretter
` (2 subsequent siblings)
3 siblings, 1 reply; 11+ messages in thread
From: Michael Tretter @ 2026-02-10 11:22 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Rouven Czerwinski,
Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter
Cc: devicetree, dri-devel, kernel, Michael Tretter,
Krzysztof Kozlowski
From: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Add vendor prefix for LXD Research & Display, LLC.
Link: https://www.lxdinc.com/
Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
---
Changes in v3:
- none
---
Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml
index c7591b2aec2a..90d5ef1f15b3 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -963,6 +963,8 @@ patternProperties:
description: Liebherr-Werk Nenzing GmbH
"^lxa,.*":
description: Linux Automation GmbH
+ "^lxd,.*":
+ description: LXD Research & Display, LLC
"^m5stack,.*":
description: M5Stack
"^macnica,.*":
--
2.47.3
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v3 2/3] dt-bindings: display: panel: add YAML schema for LXD M9189A
2026-02-10 11:22 [PATCH v3 0/3] drm/panel: add LXD M9189A Michael Tretter
2026-02-10 11:22 ` [PATCH v3 1/3] dt-bindings: vendor-prefixes: Add lxd Michael Tretter
@ 2026-02-10 11:22 ` Michael Tretter
2026-02-11 6:26 ` Claude review: " Claude Code Review Bot
2026-02-11 6:28 ` [PATCH v3 2/3] " Krzysztof Kozlowski
2026-02-10 11:22 ` [PATCH v3 3/3] drm/panel: add LXD M9189A panel driver Michael Tretter
2026-02-11 6:26 ` Claude review: drm/panel: add LXD M9189A Claude Code Review Bot
3 siblings, 2 replies; 11+ messages in thread
From: Michael Tretter @ 2026-02-10 11:22 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Rouven Czerwinski,
Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter
Cc: devicetree, dri-devel, kernel, Michael Tretter
From: Rouven Czerwinski <r.czerwinski@pengutronix.de>
The LXD M9189A is a 1024x600 MIPI-DSI panel.
Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
---
Changes in v3:
- Change maintainer to Michael Tretter <m.tretter@pengutronix.de>
- Use panel-common.yaml as base
- Rename vdd-supply to power-supply
v2:
- add missing port property
- fix example to use vdd supply
found by running make dt_binding_check as suggested by the bot
- fix missing A in M9189A title
- fix compatible
found after v1 submission
---
.../bindings/display/panel/lxd,m9189a.yaml | 63 ++++++++++++++++++++++
1 file changed, 63 insertions(+)
diff --git a/Documentation/devicetree/bindings/display/panel/lxd,m9189a.yaml b/Documentation/devicetree/bindings/display/panel/lxd,m9189a.yaml
new file mode 100644
index 000000000000..97ea5fdcd439
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/panel/lxd,m9189a.yaml
@@ -0,0 +1,63 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/panel/lxd,m9189a.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: LXD M9189A DSI Display Panel
+
+maintainers:
+ - Michael Tretter <m.tretter@pengutronix.de>
+
+allOf:
+ - $ref: panel-common.yaml
+
+properties:
+ compatible:
+ const: lxd,m9189a
+
+ reg:
+ maxItems: 1
+
+ standby-gpios:
+ description: GPIO used for the standby pin
+ maxItems: 1
+
+ reset-gpios: true
+ power-supply: true
+ backlight: true
+ port: true
+
+required:
+ - compatible
+ - reg
+ - standby-gpios
+ - reset-gpios
+ - power-supply
+ - port
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+
+ dsi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ panel@0 {
+ compatible = "lxd,m9189a";
+ reg = <0>;
+ backlight = <&backlight>;
+ reset-gpios = <&gpio3 25 GPIO_ACTIVE_LOW>;
+ standby-gpios = <&gpio5 22 GPIO_ACTIVE_LOW>;
+ power-supply = <®_display_3v3>;
+
+ port {
+ mipi_panel_in: endpoint {
+ remote-endpoint = <&mipi_dsi_out>;
+ };
+ };
+ };
+ };
--
2.47.3
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v3 3/3] drm/panel: add LXD M9189A panel driver
2026-02-10 11:22 [PATCH v3 0/3] drm/panel: add LXD M9189A Michael Tretter
2026-02-10 11:22 ` [PATCH v3 1/3] dt-bindings: vendor-prefixes: Add lxd Michael Tretter
2026-02-10 11:22 ` [PATCH v3 2/3] dt-bindings: display: panel: add YAML schema for LXD M9189A Michael Tretter
@ 2026-02-10 11:22 ` Michael Tretter
2026-02-11 6:26 ` Claude review: " Claude Code Review Bot
2026-02-11 6:26 ` Claude review: drm/panel: add LXD M9189A Claude Code Review Bot
3 siblings, 1 reply; 11+ messages in thread
From: Michael Tretter @ 2026-02-10 11:22 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Rouven Czerwinski,
Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter
Cc: devicetree, dri-devel, kernel, Michael Tretter
From: Rouven Czerwinski <r.czerwinski@pengutronix.de>
The LXD M9189A panel is based on the EK79007AD3 DSI display controller.
It currently supports only 4 lane operation.
Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
---
Changes in v3:
- Change maintainer to Michael Tretter <m.tretter@pengutronix.de>
- Fix error code if regulator is missing
- Request power-supply instead of vdd-supply
v2:
- use _multi functions
- remove unnecessary dcs_nop function
- calculate pixelclock with timings
suggested by Dmitry Baryshkov
- rename functions to m9189_ prefix
- rename struct and c file to use m9189
- fix commit title to mention m9189
---
MAINTAINERS | 6 +
drivers/gpu/drm/panel/Kconfig | 9 ++
drivers/gpu/drm/panel/Makefile | 1 +
drivers/gpu/drm/panel/panel-lxd-m9189a.c | 243 +++++++++++++++++++++++++++++++
4 files changed, 259 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index e08767323763..ba4030a4d154 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -7948,6 +7948,12 @@ F: Documentation/devicetree/bindings/display/lvds.yaml
F: Documentation/devicetree/bindings/display/panel/panel-lvds.yaml
F: drivers/gpu/drm/panel/panel-lvds.c
+DRM DRIVER FOR LXD M9189A PANELS
+M: Michael Tretter <m.tretter@pengutronix.de>
+S: Maintained
+F: Documentation/devicetree/bindings/display/panel/lxd,m9189a.yaml
+F: drivers/gpu/drm/panel/panel-lxd-m9189a.c
+
DRM DRIVER FOR MANTIX MLAF057WE51 PANELS
M: Guido Günther <agx@sigxcpu.org>
R: Purism Kernel Team <kernel@puri.sm>
diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig
index 7a83804fedca..b7d35a73080e 100644
--- a/drivers/gpu/drm/panel/Kconfig
+++ b/drivers/gpu/drm/panel/Kconfig
@@ -442,6 +442,15 @@ config DRM_PANEL_LG_SW43408
pixel. It provides a MIPI DSI interface to the host and has a
built-in LED backlight.
+config DRM_PANEL_LXD_M9189A
+ tristate "LXD M9189A MIPI-DSI LCD panel"
+ depends on OF
+ depends on DRM_MIPI_DSI
+ depends on BACKLIGHT_CLASS_DEVICE
+ help
+ Say Y if you want to enable support for the LXD M9189A 4-Lane
+ 1024x600 MIPI DSI panel.
+
config DRM_PANEL_MAGNACHIP_D53E6EA8966
tristate "Magnachip D53E6EA8966 DSI panel"
depends on OF && SPI
diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile
index b9562a6fdcb3..d1303455a374 100644
--- a/drivers/gpu/drm/panel/Makefile
+++ b/drivers/gpu/drm/panel/Makefile
@@ -44,6 +44,7 @@ obj-$(CONFIG_DRM_PANEL_LG_LB035Q02) += panel-lg-lb035q02.o
obj-$(CONFIG_DRM_PANEL_LG_LD070WX3) += panel-lg-ld070wx3.o
obj-$(CONFIG_DRM_PANEL_LG_LG4573) += panel-lg-lg4573.o
obj-$(CONFIG_DRM_PANEL_LG_SW43408) += panel-lg-sw43408.o
+obj-$(CONFIG_DRM_PANEL_LXD_M9189A) += panel-lxd-m9189a.o
obj-$(CONFIG_DRM_PANEL_MAGNACHIP_D53E6EA8966) += panel-magnachip-d53e6ea8966.o
obj-$(CONFIG_DRM_PANEL_NEC_NL8048HL11) += panel-nec-nl8048hl11.o
obj-$(CONFIG_DRM_PANEL_NEWVISION_NV3051D) += panel-newvision-nv3051d.o
diff --git a/drivers/gpu/drm/panel/panel-lxd-m9189a.c b/drivers/gpu/drm/panel/panel-lxd-m9189a.c
new file mode 100644
index 000000000000..df1d029f8b26
--- /dev/null
+++ b/drivers/gpu/drm/panel/panel-lxd-m9189a.c
@@ -0,0 +1,243 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Generated with linux-mdss-dsi-panel-driver-generator from vendor device tree.
+ * Copyright (c) 2024 Luca Weiss <luca.weiss@fairphone.com>
+ */
+
+#include <linux/delay.h>
+#include <linux/gpio/consumer.h>
+#include <linux/module.h>
+#include <linux/of.h>
+#include <linux/regulator/consumer.h>
+#include <linux/types.h>
+
+#include <drm/drm_mipi_dsi.h>
+#include <drm/drm_modes.h>
+#include <drm/drm_panel.h>
+#include <drm/drm_probe_helper.h>
+
+/* Manufacturer specific DSI commands */
+#define EK79007AD3_GAMMA1 0x80
+#define EK79007AD3_GAMMA2 0x81
+#define EK79007AD3_GAMMA3 0x82
+#define EK79007AD3_GAMMA4 0x83
+#define EK79007AD3_GAMMA5 0x84
+#define EK79007AD3_GAMMA6 0x85
+#define EK79007AD3_GAMMA7 0x86
+#define EK79007AD3_PANEL_CTRL3 0xB2
+
+struct m9189_panel {
+ struct drm_panel panel;
+ struct mipi_dsi_device *dsi;
+ struct regulator *supply;
+ struct gpio_desc *reset_gpio;
+ struct gpio_desc *standby_gpio;
+};
+
+static inline struct m9189_panel *to_m9189_panel(struct drm_panel *panel)
+{
+ return container_of(panel, struct m9189_panel, panel);
+}
+
+static void m9189_reset(struct m9189_panel *m9189)
+{
+ gpiod_set_value_cansleep(m9189->reset_gpio, 0);
+ msleep(20);
+ gpiod_set_value_cansleep(m9189->reset_gpio, 1);
+ msleep(30);
+ gpiod_set_value_cansleep(m9189->reset_gpio, 0);
+ msleep(55);
+}
+
+static int m9189_on(struct m9189_panel *m9189)
+{
+ struct mipi_dsi_multi_context ctx = { .dsi = m9189->dsi };
+
+ ctx.dsi->mode_flags |= MIPI_DSI_MODE_LPM;
+
+ /* Gamma 2.2 */
+ mipi_dsi_dcs_write_seq_multi(&ctx, EK79007AD3_GAMMA1, 0x48);
+ mipi_dsi_dcs_write_seq_multi(&ctx, EK79007AD3_GAMMA2, 0xB8);
+ mipi_dsi_dcs_write_seq_multi(&ctx, EK79007AD3_GAMMA3, 0x88);
+ mipi_dsi_dcs_write_seq_multi(&ctx, EK79007AD3_GAMMA4, 0x88);
+ mipi_dsi_dcs_write_seq_multi(&ctx, EK79007AD3_GAMMA5, 0x58);
+ mipi_dsi_dcs_write_seq_multi(&ctx, EK79007AD3_GAMMA6, 0xD2);
+ mipi_dsi_dcs_write_seq_multi(&ctx, EK79007AD3_GAMMA7, 0x88);
+ mipi_dsi_msleep(&ctx, 50);
+
+ /* 4 Lanes */
+ mipi_dsi_generic_write_multi(&ctx, (u8[]){ EK79007AD3_PANEL_CTRL3, 0x70 }, 2);
+
+ mipi_dsi_dcs_exit_sleep_mode_multi(&ctx);
+ mipi_dsi_msleep(&ctx, 120);
+
+ mipi_dsi_dcs_set_display_on_multi(&ctx);
+ mipi_dsi_msleep(&ctx, 120);
+
+ return ctx.accum_err;
+}
+
+static int m9189_disable(struct drm_panel *panel)
+{
+ struct m9189_panel *m9189 = to_m9189_panel(panel);
+ struct mipi_dsi_multi_context ctx = { .dsi = m9189->dsi };
+
+ ctx.dsi->mode_flags &= ~MIPI_DSI_MODE_LPM;
+
+ mipi_dsi_dcs_enter_sleep_mode_multi(&ctx);
+ mipi_dsi_msleep(&ctx, 120);
+
+ gpiod_set_value_cansleep(m9189->standby_gpio, 1);
+
+ return ctx.accum_err;
+}
+
+static int m9189_prepare(struct drm_panel *panel)
+{
+ struct m9189_panel *m9189 = to_m9189_panel(panel);
+ struct device *dev = &m9189->dsi->dev;
+ int ret;
+
+ ret = regulator_enable(m9189->supply);
+ if (ret < 0) {
+ dev_err(dev, "Failed to enable regulators: %d\n", ret);
+ return ret;
+ }
+
+ gpiod_set_value_cansleep(m9189->standby_gpio, 0);
+ msleep(20);
+ m9189_reset(m9189);
+
+ ret = m9189_on(m9189);
+ if (ret < 0) {
+ dev_err(dev, "Failed to initialize panel: %d\n", ret);
+ gpiod_set_value_cansleep(m9189->reset_gpio, 1);
+ regulator_disable(m9189->supply);
+ return ret;
+ }
+
+ return 0;
+}
+
+static int m9189_unprepare(struct drm_panel *panel)
+{
+ struct m9189_panel *m9189 = to_m9189_panel(panel);
+
+ gpiod_set_value_cansleep(m9189->standby_gpio, 1);
+ msleep(50);
+
+ gpiod_set_value_cansleep(m9189->reset_gpio, 1);
+ regulator_disable(m9189->supply);
+
+ return 0;
+}
+
+static const struct drm_display_mode m9189_mode = {
+ .clock = (1024 + 160 + 160 + 10) * (600 + 12 + 23 + 1) * 60 / 1000,
+ .hdisplay = 1024,
+ .hsync_start = 1024 + 160,
+ .hsync_end = 1024 + 160 + 160,
+ .htotal = 1024 + 160 + 160 + 10,
+ .vdisplay = 600,
+ .vsync_start = 600 + 12,
+ .vsync_end = 600 + 12 + 23,
+ .vtotal = 600 + 12 + 23 + 1,
+ .width_mm = 154,
+ .height_mm = 86,
+};
+
+static int m9189_get_modes(struct drm_panel *panel,
+ struct drm_connector *connector)
+{
+ return drm_connector_helper_get_modes_fixed(connector, &m9189_mode);
+}
+
+static const struct drm_panel_funcs m9189_panel_funcs = {
+ .prepare = m9189_prepare,
+ .unprepare = m9189_unprepare,
+ .disable = m9189_disable,
+ .get_modes = m9189_get_modes,
+};
+
+static int lxd_m9189_probe(struct mipi_dsi_device *dsi)
+{
+ struct device *dev = &dsi->dev;
+ struct m9189_panel *m9189;
+ int ret;
+
+ m9189 = devm_kzalloc(dev, sizeof(*m9189), GFP_KERNEL);
+ if (!m9189)
+ return -ENOMEM;
+
+ m9189->supply = devm_regulator_get(dev, "power");
+ if (IS_ERR(m9189->supply))
+ return dev_err_probe(dev, PTR_ERR(m9189->supply),
+ "Failed to get power-supply\n");
+
+ m9189->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
+ if (IS_ERR(m9189->reset_gpio))
+ return dev_err_probe(dev, PTR_ERR(m9189->reset_gpio),
+ "Failed to get reset-gpios\n");
+
+ m9189->standby_gpio = devm_gpiod_get(dev, "standby", GPIOD_OUT_LOW);
+ if (IS_ERR(m9189->standby_gpio))
+ return dev_err_probe(dev, PTR_ERR(m9189->standby_gpio),
+ "Failed to get standby-gpios\n");
+
+ m9189->dsi = dsi;
+ mipi_dsi_set_drvdata(dsi, m9189);
+
+ dsi->lanes = 4;
+ dsi->format = MIPI_DSI_FMT_RGB888;
+ dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST;
+
+ drm_panel_init(&m9189->panel, dev, &m9189_panel_funcs,
+ DRM_MODE_CONNECTOR_DSI);
+ m9189->panel.prepare_prev_first = true;
+
+ ret = drm_panel_of_backlight(&m9189->panel);
+ if (ret)
+ return dev_err_probe(dev, ret, "Failed to get backlight\n");
+
+ drm_panel_add(&m9189->panel);
+
+ ret = mipi_dsi_attach(dsi);
+ if (ret < 0) {
+ dev_err_probe(dev, ret, "Failed to attach to DSI host\n");
+ drm_panel_remove(&m9189->panel);
+ return ret;
+ }
+
+ return 0;
+}
+
+static void lxd_m9189_remove(struct mipi_dsi_device *dsi)
+{
+ struct m9189_panel *m9189 = mipi_dsi_get_drvdata(dsi);
+ int ret;
+
+ ret = mipi_dsi_detach(dsi);
+ if (ret < 0)
+ dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret);
+
+ drm_panel_remove(&m9189->panel);
+}
+
+static const struct of_device_id lxd_m9189_of_match[] = {
+ { .compatible = "lxd,m9189a" },
+ { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, lxd_m9189_of_match);
+
+static struct mipi_dsi_driver lxd_m9189_driver = {
+ .probe = lxd_m9189_probe,
+ .remove = lxd_m9189_remove,
+ .driver = {
+ .name = "panel-lxa-m9189a",
+ .of_match_table = lxd_m9189_of_match,
+ },
+};
+module_mipi_dsi_driver(lxd_m9189_driver);
+
+MODULE_DESCRIPTION("DRM driver for LXD M9189A MIPI-DSI panels");
+MODULE_LICENSE("GPL");
--
2.47.3
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Claude review: drm/panel: add LXD M9189A
2026-02-10 11:22 [PATCH v3 0/3] drm/panel: add LXD M9189A Michael Tretter
` (2 preceding siblings ...)
2026-02-10 11:22 ` [PATCH v3 3/3] drm/panel: add LXD M9189A panel driver Michael Tretter
@ 2026-02-11 6:26 ` Claude Code Review Bot
3 siblings, 0 replies; 11+ messages in thread
From: Claude Code Review Bot @ 2026-02-11 6:26 UTC (permalink / raw)
To: dri-devel-reviews
Overall Series Review
Subject: drm/panel: add LXD M9189A
Author: Michael Tretter <m.tretter@pengutronix.de>
Patches: 4
Reviewed: 2026-02-11T16:26:35.429399
---
This is a 3-patch series adding support for the LXD M9189A LCD panel with MIPI-DSI interface. The series follows the standard Linux kernel pattern for adding a new display panel:
1. **PATCH 1/3**: Adds vendor prefix for LXD Research & Display, LLC
2. **PATCH 2/3**: Adds device tree bindings for the panel
3. **PATCH 3/3**: Adds the actual panel driver implementation
**General Assessment:**
The series is well-structured and follows established patterns for panel driver submissions. The patches are properly ordered (vendor prefix → bindings → driver), which is correct. The code appears to be based on v2 feedback and includes improvements like using `mipi_dsi_multi_context` helpers and fixing regulator handling.
**Positive aspects:**
- Good use of modern DRM panel APIs
- Proper use of multi-context helpers for DSI commands
- Clear separation of concerns
- Includes MAINTAINERS updates
- Has been through multiple review cycles (v3)
**Areas of concern:**
- Some naming inconsistencies between driver name and structure names
- Missing validation in certain code paths
- Some hardcoded values that could benefit from defines or comments
---
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 11+ messages in thread
* Claude review: dt-bindings: vendor-prefixes: Add lxd
2026-02-10 11:22 ` [PATCH v3 1/3] dt-bindings: vendor-prefixes: Add lxd Michael Tretter
@ 2026-02-11 6:26 ` Claude Code Review Bot
0 siblings, 0 replies; 11+ messages in thread
From: Claude Code Review Bot @ 2026-02-11 6:26 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
**Subject:** `[PATCH v3 1/3] dt-bindings: vendor-prefixes: Add lxd`
```
+ "^lxd,.*":
+ description: LXD Research & Display, LLC
```
**Review:**
This patch is straightforward and correct. It adds the vendor prefix for LXD Research & Display, LLC to the vendor prefixes YAML file.
**Positive:**
- Already has `Acked-by: Krzysztof Kozlowski <krzk@kernel.org>` which indicates DT maintainer approval
- Placement in alphabetical order is correct (between "lxa" and "m5stack")
- Link to vendor website is provided in commit message
- Follows standard format
**No issues found.** This patch is ready for merge.
---
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 11+ messages in thread
* Claude review: dt-bindings: display: panel: add YAML schema for LXD M9189A
2026-02-10 11:22 ` [PATCH v3 2/3] dt-bindings: display: panel: add YAML schema for LXD M9189A Michael Tretter
@ 2026-02-11 6:26 ` Claude Code Review Bot
2026-02-11 6:28 ` [PATCH v3 2/3] " Krzysztof Kozlowski
1 sibling, 0 replies; 11+ messages in thread
From: Claude Code Review Bot @ 2026-02-11 6:26 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
**Subject:** `[PATCH v3 2/3] dt-bindings: display: panel: add YAML schema for LXD M9189A`
**Review of binding file (lxd,m9189a.yaml):**
```yaml
+allOf:
+ - $ref: panel-common.yaml
```
**Positive:**
- Correctly references panel-common.yaml as base, which is the modern approach (changed in v3)
- Properties are properly documented
- Example is complete and compiles
**Issues identified:**
1. **Missing backlight requirement** (line 511-513):
```yaml
+ reset-gpios: true
+ power-supply: true
+ backlight: true
```
The binding declares `backlight: true` but doesn't include it in the `required:` section. However, the driver code at line 343-345 does this:
```c
+ ret = drm_panel_of_backlight(&m9189->panel);
+ if (ret)
+ return dev_err_probe(dev, ret, "Failed to get backlight\n");
```
**Question:** Is backlight optional or required? If `drm_panel_of_backlight()` returns an error when backlight is missing, then it should be in the required list. If it's optional, the binding is correct but the error message might be misleading.
2. **Standby GPIO polarity** (line 538):
```yaml
+ standby-gpios = <&gpio5 22 GPIO_ACTIVE_LOW>;
```
The example shows `GPIO_ACTIVE_LOW`, but there's no documentation explaining what "standby" means for this panel. A description would help:
```yaml
standby-gpios:
description: GPIO used for the standby pin
maxItems: 1
```
Consider adding more detail: "GPIO used to control panel standby mode. Assert to enter standby, de-assert for normal operation."
**Minor:** The example could use more descriptive node names, but this is very minor and matches common practice.
---
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 11+ messages in thread
* Claude review: drm/panel: add LXD M9189A panel driver
2026-02-10 11:22 ` [PATCH v3 3/3] drm/panel: add LXD M9189A panel driver Michael Tretter
@ 2026-02-11 6:26 ` Claude Code Review Bot
0 siblings, 0 replies; 11+ messages in thread
From: Claude Code Review Bot @ 2026-02-11 6:26 UTC (permalink / raw)
To: dri-devel-reviews
Patch Review
**Subject:** `[PATCH v3 3/3] drm/panel: add LXD M9189A panel driver`
**Review of driver implementation:**
#### 1. **File header copyright mismatch** (lines 147-150):
```c
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Generated with linux-mdss-dsi-panel-driver-generator from vendor device tree.
+ * Copyright (c) 2024 Luca Weiss <luca.weiss@fairphone.com>
+ */
```
**Issue:** The copyright attributes the code to Luca Weiss, but the patch is signed off by Rouven Czerwinski and Michael Tretter. This appears to be boilerplate from a code generator that wasn't updated. Either:
- Update copyright to reflect actual authors, or
- Add a note explaining this was generated from tooling with that copyright
#### 2. **Naming inconsistency** (throughout file):
The driver uses mixed naming:
- File: `panel-lxd-m9189a.c` (line 88, 140)
- Kconfig: `DRM_PANEL_LXD_M9189A` (line 116)
- Functions: `m9189_*` prefix (e.g., `m9189_reset`, `m9189_on`)
- Structure: `m9189_panel`
- Driver name: `panel-lxa-m9189a` (line 381) ← **TYPO!**
```c
+ .driver = {
+ .name = "panel-lxa-m9189a",
+ .of_match_table = lxd_m9189_of_match,
+ },
```
**Critical bug:** The driver name is `"panel-lxa-m9189a"` (lxa) but should be `"panel-lxd-m9189a"` (lxd) to match the vendor prefix and file naming.
#### 3. **Magic numbers in timing** (line 281):
```c
+static const struct drm_display_mode m9189_mode = {
+ .clock = (1024 + 160 + 160 + 10) * (600 + 12 + 23 + 1) * 60 / 1000,
+ .hdisplay = 1024,
+ .hsync_start = 1024 + 160,
+ .hsync_end = 1024 + 160 + 160,
+ .htotal = 1024 + 160 + 160 + 10,
+ .vdisplay = 600,
+ .vsync_start = 600 + 12,
+ .vsync_end = 600 + 12 + 23,
+ .vtotal = 600 + 12 + 23 + 1,
```
**Suggestion:** While the formula for clock calculation is clear, consider using #defines for the porch/sync values to make them more readable:
```c
#define M9189_HFRONT_PORCH 160
#define M9189_HSYNC 160
#define M9189_HBACK_PORCH 10
#define M9189_VFRONT_PORCH 12
#define M9189_VSYNC 23
#define M9189_VBACK_PORCH 1
```
This is a minor style issue but improves maintainability.
#### 4. **Missing mode flags** (line 281-292):
The mode structure doesn't specify any flags (hsync/vsync polarity, etc.):
```c
+static const struct drm_display_mode m9189_mode = {
+ .clock = (1024 + 160 + 160 + 10) * (600 + 12 + 23 + 1) * 60 / 1000,
+ ...
+ .width_mm = 154,
+ .height_mm = 86,
+};
```
**Question:** Are the default sync polarities (positive hsync/vsync) correct for this panel? Typically this should be documented or explicitly set.
#### 5. **Error handling in probe** (line 317-320):
```c
+ m9189->supply = devm_regulator_get(dev, "power");
+ if (IS_ERR(m9189->supply))
+ return dev_err_probe(dev, PTR_ERR(m9189->supply),
+ "Failed to get power-supply\n");
```
**Good:** The v3 changelog mentions "Fix error code if regulator is missing" and this looks correct. Using `dev_err_probe()` with `PTR_ERR()` is the right pattern.
#### 6. **Regulator enable/disable asymmetry** (lines 246-250 vs 275):
In `m9189_prepare()`:
```c
+ ret = regulator_enable(m9189->supply);
+ if (ret < 0) {
+ dev_err(dev, "Failed to enable regulators: %d\n", ret);
+ return ret;
+ }
```
In error path (lines 259-260):
```c
+ gpiod_set_value_cansleep(m9189->reset_gpio, 1);
+ regulator_disable(m9189->supply);
```
In `m9189_unprepare()` (line 275):
```c
+ regulator_disable(m9189->supply);
```
**Analysis:** The regulator is enabled in `prepare()` and disabled in `unprepare()`, which is correct. Error paths also properly disable it. However, there's a potential issue:
In `m9189_disable()` (lines 235-236):
```c
+ gpiod_set_value_cansleep(m9189->standby_gpio, 1);
+
+ return ctx.accum_err;
```
The `disable()` callback sets standby but doesn't touch the regulator. This is probably correct since `unprepare()` handles power, but the ordering should be verified:
- `prepare()` enables power, then initializes panel
- `disable()` puts panel in sleep mode
- `unprepare()` cuts power
This appears correct per DRM panel API conventions.
#### 7. **GPIO active state confusion** (lines 189-194):
```c
+static void m9189_reset(struct m9189_panel *m9189)
+{
+ gpiod_set_value_cansleep(m9189->reset_gpio, 0);
+ msleep(20);
+ gpiod_set_value_cansleep(m9189->reset_gpio, 1);
+ msleep(30);
+ gpiod_set_value_cansleep(m9189->reset_gpio, 0);
+ msleep(55);
+}
```
The reset sequence is: LOW → HIGH → LOW. Combined with:
```c
+ m9189->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
```
And the binding example:
```yaml
+ reset-gpios = <&gpio3 25 GPIO_ACTIVE_LOW>;
```
**Analysis:**
- GPIO is acquired with `GPIOD_OUT_LOW` (logical 0)
- With `GPIO_ACTIVE_LOW` in DT, this means physical HIGH
- Reset sequence: physical HIGH → LOW → HIGH
- Assuming reset is active-low (common), this means: inactive → active → inactive
This seems inverted. Typically reset should start inactive, go active, then inactive:
- Start: logical 0 (inactive, physical HIGH with ACTIVE_LOW) ✓
- Assert reset: logical 1 (active, physical LOW with ACTIVE_LOW) ✓
- Release: logical 0 (inactive, physical HIGH) ✓
Wait, the sequence is `0 → 1 → 0`, which IS correct! The reset line is asserted (logical 1) in the middle. The code is actually correct.
However, in the error path and unprepare (lines 259, 274):
```c
+ gpiod_set_value_cansleep(m9189->reset_gpio, 1);
```
This sets reset to logical 1 (active/asserted) to keep the panel in reset while powered off, which makes sense.
**No issue here**, but the logic is a bit hard to follow. A comment might help.
#### 8. **Manufacturer command definitions** (lines 164-172):
```c
+/* Manufacturer specific DSI commands */
+#define EK79007AD3_GAMMA1 0x80
+#define EK79007AD3_GAMMA2 0x81
+#define EK79007AD3_GAMMA3 0x82
+#define EK79007AD3_GAMMA4 0x83
+#define EK79007AD3_GAMMA5 0x84
+#define EK79007AD3_GAMMA6 0x85
+#define EK79007AD3_GAMMA7 0x86
+#define EK79007AD3_PANEL_CTRL3 0xB2
```
**Good:** Commands are well-documented with the controller name prefix.
#### 9. **Hardcoded gamma values** (lines 203-211):
```c
+ /* Gamma 2.2 */
+ mipi_dsi_dcs_write_seq_multi(&ctx, EK79007AD3_GAMMA1, 0x48);
+ mipi_dsi_dcs_write_seq_multi(&ctx, EK79007AD3_GAMMA2, 0xB8);
+ mipi_dsi_dcs_write_seq_multi(&ctx, EK79007AD3_GAMMA3, 0x88);
+ mipi_dsi_dcs_write_seq_multi(&ctx, EK79007AD3_GAMMA4, 0x88);
+ mipi_dsi_dcs_write_seq_multi(&ctx, EK79007AD3_GAMMA5, 0x58);
+ mipi_dsi_dcs_write_seq_multi(&ctx, EK79007AD3_GAMMA6, 0xD2);
+ mipi_dsi_dcs_write_seq_multi(&ctx, EK79007AD3_GAMMA7, 0x88);
+ mipi_dsi_msleep(&ctx, 50);
```
**Acceptable:** These are panel-specific gamma calibration values, likely from vendor specification. Hardcoding them is normal for panel drivers.
#### 10. **Generic write for panel control** (line 214):
```c
+ /* 4 Lanes */
+ mipi_dsi_generic_write_multi(&ctx, (u8[]){ EK79007AD3_PANEL_CTRL3, 0x70 }, 2);
```
**Question:** Why is this using `mipi_dsi_generic_write_multi()` instead of `mipi_dsi_dcs_write_seq_multi()` like the gamma commands? Is `0xB2` not a DCS command?
If it's a manufacturer-specific command, `generic_write` is correct, but then the gamma commands above should probably also use generic_write. The comment says the panel supports "only 4 lane operation" (line 65), but the code doesn't validate that `dsi->lanes == 4` anywhere.
Consider adding validation in probe:
```c
if (dsi->lanes != 4) {
dev_err(dev, "This panel only supports 4-lane operation\n");
return -EINVAL;
}
```
Or if the panel could theoretically support other lane counts, remove the "only" from the commit message.
#### 11. **MAINTAINERS entry** (lines 99-104):
```
+DRM DRIVER FOR LXD M9189A PANELS
+M: Michael Tretter <m.tretter@pengutronix.de>
+S: Maintained
+F: Documentation/devicetree/bindings/display/panel/lxd,m9189a.yaml
+F: drivers/gpu/drm/panel/panel-lxd-m9189a.c
```
**Good:** Proper MAINTAINERS entry with status and file patterns. Alphabetical ordering looks correct (between LVDS and MANTIX entries).
#### 12. **Module metadata** (lines 387-388):
```c
+MODULE_DESCRIPTION("DRM driver for LXD M9189A MIPI-DSI panels");
+MODULE_LICENSE("GPL");
```
**Issue:** License mismatch. The SPDX header says `GPL-2.0-only` but `MODULE_LICENSE("GPL")` can mean GPL v2 or later. Should be:
```c
MODULE_LICENSE("GPL v2");
```
to match the SPDX identifier.
---
## SUMMARY OF ISSUES
### Critical:
1. **Driver name typo** (panel-lxa vs panel-lxd) - MUST FIX
2. **MODULE_LICENSE mismatch** - should be "GPL v2" not "GPL"
### Important:
3. **Copyright header** - needs updating or explanation
4. **Backlight requirement** - unclear if optional or required in binding
5. **Lane count validation** - driver doesn't validate 4-lane requirement
### Minor/Suggestions:
6. Magic numbers in display mode could use #defines
7. Missing mode flags documentation
8. Inconsistent use of DCS vs generic write
9. Standby GPIO needs better documentation in binding
### Good practices observed:
- Use of modern multi-context helpers
- Proper error handling with dev_err_probe
- Correct panel lifecycle (prepare/unprepare/disable)
- Devm resource management
- prepare_prev_first flag set appropriately
**Overall verdict:** The series needs at least the critical fixes before merge. The rest are improvements that could be addressed or explained in discussion with maintainers.
---
Generated by Claude Code Patch Reviewer
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3 2/3] dt-bindings: display: panel: add YAML schema for LXD M9189A
2026-02-10 11:22 ` [PATCH v3 2/3] dt-bindings: display: panel: add YAML schema for LXD M9189A Michael Tretter
2026-02-11 6:26 ` Claude review: " Claude Code Review Bot
@ 2026-02-11 6:28 ` Krzysztof Kozlowski
2026-02-11 10:06 ` Michael Tretter
1 sibling, 1 reply; 11+ messages in thread
From: Krzysztof Kozlowski @ 2026-02-11 6:28 UTC (permalink / raw)
To: Michael Tretter
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Rouven Czerwinski,
Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, devicetree,
dri-devel, kernel
On Tue, Feb 10, 2026 at 12:22:33PM +0100, Michael Tretter wrote:
> From: Rouven Czerwinski <r.czerwinski@pengutronix.de>
>
> The LXD M9189A is a 1024x600 MIPI-DSI panel.
>
> Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
> Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
I do not see any improvements.
NAK
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3 2/3] dt-bindings: display: panel: add YAML schema for LXD M9189A
2026-02-11 6:28 ` [PATCH v3 2/3] " Krzysztof Kozlowski
@ 2026-02-11 10:06 ` Michael Tretter
2026-02-11 10:12 ` Krzysztof Kozlowski
0 siblings, 1 reply; 11+ messages in thread
From: Michael Tretter @ 2026-02-11 10:06 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Rouven Czerwinski,
Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, devicetree,
dri-devel, kernel
On Wed, 11 Feb 2026 07:28:55 +0100, Krzysztof Kozlowski wrote:
> On Tue, Feb 10, 2026 at 12:22:33PM +0100, Michael Tretter wrote:
> > From: Rouven Czerwinski <r.czerwinski@pengutronix.de>
> >
> > The LXD M9189A is a 1024x600 MIPI-DSI panel.
> >
> > Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
> > Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
>
> I do not see any improvements.
Changes in v3:
- [...]
- Use panel-common.yaml as base
- [...]
This change addresses your comment on v2:
>> You should reference proper panel schema in top-level.
I changed the schema to include panel-common.yaml as a $ref. Did I
misunderstand the comment?
What else needs improvement?
I am confused and any guidance would be appreciated.
Michael
>
> NAK
>
> Best regards,
> Krzysztof
>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v3 2/3] dt-bindings: display: panel: add YAML schema for LXD M9189A
2026-02-11 10:06 ` Michael Tretter
@ 2026-02-11 10:12 ` Krzysztof Kozlowski
0 siblings, 0 replies; 11+ messages in thread
From: Krzysztof Kozlowski @ 2026-02-11 10:12 UTC (permalink / raw)
To: Michael Tretter
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Rouven Czerwinski,
Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, devicetree,
dri-devel, kernel
On 11/02/2026 11:06, Michael Tretter wrote:
> On Wed, 11 Feb 2026 07:28:55 +0100, Krzysztof Kozlowski wrote:
>> On Tue, Feb 10, 2026 at 12:22:33PM +0100, Michael Tretter wrote:
>>> From: Rouven Czerwinski <r.czerwinski@pengutronix.de>
>>>
>>> The LXD M9189A is a 1024x600 MIPI-DSI panel.
>>>
>>> Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
>>> Signed-off-by: Michael Tretter <m.tretter@pengutronix.de>
>>
>> I do not see any improvements.
>
> Changes in v3:
> - [...]
> - Use panel-common.yaml as base
> - [...]
>
> This change addresses your comment on v2:
>
>>> You should reference proper panel schema in top-level.
>
> I changed the schema to include panel-common.yaml as a $ref. Did I
> misunderstand the comment?
>
> What else needs improvement?
>
> I am confused and any guidance would be appreciated.
>
In such case I find it helpful when you go via previous comments and
ack/acknowledge each of them. It is not necessary if you implement all
of them, but that did not happen here. BTW, I stopped review on the
first missing review feedback to save myself time.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2026-02-11 10:12 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-10 11:22 [PATCH v3 0/3] drm/panel: add LXD M9189A Michael Tretter
2026-02-10 11:22 ` [PATCH v3 1/3] dt-bindings: vendor-prefixes: Add lxd Michael Tretter
2026-02-11 6:26 ` Claude review: " Claude Code Review Bot
2026-02-10 11:22 ` [PATCH v3 2/3] dt-bindings: display: panel: add YAML schema for LXD M9189A Michael Tretter
2026-02-11 6:26 ` Claude review: " Claude Code Review Bot
2026-02-11 6:28 ` [PATCH v3 2/3] " Krzysztof Kozlowski
2026-02-11 10:06 ` Michael Tretter
2026-02-11 10:12 ` Krzysztof Kozlowski
2026-02-10 11:22 ` [PATCH v3 3/3] drm/panel: add LXD M9189A panel driver Michael Tretter
2026-02-11 6:26 ` Claude review: " Claude Code Review Bot
2026-02-11 6:26 ` Claude review: drm/panel: add LXD M9189A Claude Code Review Bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox