* [PATCH v2 1/3] dt-bindings: vendor-prefixes: Add lxd
@ 2024-10-25 14:11 Rouven Czerwinski
2024-10-25 14:11 ` [PATCH v2 2/3] dt-bindings: display: panel: add YAML schema for LXD M9189A Rouven Czerwinski
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Rouven Czerwinski @ 2024-10-25 14:11 UTC (permalink / raw)
To: Rob Herring, devicetree, linux-kernel
Cc: kernel, Rouven Czerwinski, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
Add vendor prefix for LXD Research & Display, LLC.
Link: https://www.lxdinc.com/
Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
---
v2:
- no changes
v1: https://lore.kernel.org/all/20241023124411.1153552-1-r.czerwinski@pengutronix.de/
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 b320a39de7fe4..83d9e49eeb869 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
+++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
@@ -872,6 +872,8 @@ patternProperties:
description: Liebherr-Werk Nenzing GmbH
"^lxa,.*":
description: Linux Automation GmbH
+ "^lxd,.*":
+ description: LXD Research & Display, LLC
"^m5stack,.*":
description: M5Stack
"^macnica,.*":
base-commit: c2ee9f594da826bea183ed14f2cc029c719bf4da
--
2.39.5
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 2/3] dt-bindings: display: panel: add YAML schema for LXD M9189A
2024-10-25 14:11 [PATCH v2 1/3] dt-bindings: vendor-prefixes: Add lxd Rouven Czerwinski
@ 2024-10-25 14:11 ` Rouven Czerwinski
2024-10-26 12:29 ` Krzysztof Kozlowski
2024-10-25 14:11 ` [PATCH v2 3/3] drm/panel: add LXD M9189A panel driver Rouven Czerwinski
2024-10-26 12:27 ` [PATCH v2 1/3] dt-bindings: vendor-prefixes: Add lxd Krzysztof Kozlowski
2 siblings, 1 reply; 7+ messages in thread
From: Rouven Czerwinski @ 2024-10-25 14:11 UTC (permalink / raw)
To: Jessica Zhang, Sam Ravnborg, dri-devel, devicetree, linux-kernel
Cc: kernel, Rouven Czerwinski, Neil Armstrong, David Airlie,
Daniel Vetter, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
The LXD M9189A is a 1024x600 MIPI-DSI panel.
Signed-off-by: Rouven Czerwinski <r.czerwinski@pengutronix.de>
---
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 | 68 +++++++++++++++++++
1 file changed, 68 insertions(+)
create mode 100644 Documentation/devicetree/bindings/display/panel/lxd,m9189a.yaml
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 0000000000000..2f14213801a48
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/panel/lxd,m9189a.yaml
@@ -0,0 +1,68 @@
+# 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:
+ - Rouven Czerwinski <r.czerwinski@pengutronix.de>
+
+properties:
+ compatible:
+ const: lxd,m9189a
+
+ reg:
+ maxItems: 1
+
+ standby-gpios:
+ description: GPIO used for the standby pin
+ maxItems: 1
+
+ reset-gpios:
+ description: GPIO used for the reset pin
+ maxItems: 1
+
+ vdd-supply:
+ description: Power regulator
+
+ backlight:
+ description: Backlight used by the panel
+ $ref: /schemas/types.yaml#/definitions/phandle
+
+ port: true
+
+required:
+ - compatible
+ - reg
+ - standby-gpios
+ - reset-gpios
+ - vdd-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>;
+ vdd-supply = <®_display_3v3>;
+
+ port {
+ mipi_panel_in: endpoint {
+ remote-endpoint = <&mipi_dsi_out>;
+ };
+ };
+ };
+ };
--
2.39.5
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v2 3/3] drm/panel: add LXD M9189A panel driver
2024-10-25 14:11 [PATCH v2 1/3] dt-bindings: vendor-prefixes: Add lxd Rouven Czerwinski
2024-10-25 14:11 ` [PATCH v2 2/3] dt-bindings: display: panel: add YAML schema for LXD M9189A Rouven Czerwinski
@ 2024-10-25 14:11 ` Rouven Czerwinski
2024-11-02 1:02 ` kernel test robot
2024-10-26 12:27 ` [PATCH v2 1/3] dt-bindings: vendor-prefixes: Add lxd Krzysztof Kozlowski
2 siblings, 1 reply; 7+ messages in thread
From: Rouven Czerwinski @ 2024-10-25 14:11 UTC (permalink / raw)
To: Jessica Zhang, Sam Ravnborg, linux-kernel, dri-devel
Cc: kernel, Rouven Czerwinski, Neil Armstrong, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, David Airlie, Daniel Vetter
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>
---
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 | 241 +++++++++++++++++++++++
4 files changed, 257 insertions(+)
create mode 100644 drivers/gpu/drm/panel/panel-lxd-m9189a.c
diff --git a/MAINTAINERS b/MAINTAINERS
index e9659a5a7fb33..e4d749b403c28 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -7179,6 +7179,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: Rouven Czerwinski <r.czerwinski@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 d3a9a9fafe4ec..c9acba8f2432c 100644
--- a/drivers/gpu/drm/panel/Kconfig
+++ b/drivers/gpu/drm/panel/Kconfig
@@ -386,6 +386,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 987a087024103..705e9f112eb56 100644
--- a/drivers/gpu/drm/panel/Makefile
+++ b/drivers/gpu/drm/panel/Makefile
@@ -39,6 +39,7 @@ obj-$(CONFIG_DRM_PANEL_LINCOLNTECH_LCD197) += panel-lincolntech-lcd197.o
obj-$(CONFIG_DRM_PANEL_LG_LB035Q02) += panel-lg-lb035q02.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 0000000000000..07bd88c488712
--- /dev/null
+++ b/drivers/gpu/drm/panel/panel-lxd-m9189a.c
@@ -0,0 +1,241 @@
+// 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 <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, "vdd");
+ if (IS_ERR(m9189->supply))
+ return dev_err_probe(dev, ret, "Failed to get regulator\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.39.5
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/3] dt-bindings: vendor-prefixes: Add lxd
2024-10-25 14:11 [PATCH v2 1/3] dt-bindings: vendor-prefixes: Add lxd Rouven Czerwinski
2024-10-25 14:11 ` [PATCH v2 2/3] dt-bindings: display: panel: add YAML schema for LXD M9189A Rouven Czerwinski
2024-10-25 14:11 ` [PATCH v2 3/3] drm/panel: add LXD M9189A panel driver Rouven Czerwinski
@ 2024-10-26 12:27 ` Krzysztof Kozlowski
2 siblings, 0 replies; 7+ messages in thread
From: Krzysztof Kozlowski @ 2024-10-26 12:27 UTC (permalink / raw)
To: Rouven Czerwinski
Cc: Rob Herring, devicetree, linux-kernel, kernel, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
On Fri, Oct 25, 2024 at 04:11:27PM +0200, Rouven Czerwinski wrote:
> Add vendor prefix for LXD Research & Display, LLC.
> Link: https://www.lxdinc.com/
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/3] dt-bindings: display: panel: add YAML schema for LXD M9189A
2024-10-25 14:11 ` [PATCH v2 2/3] dt-bindings: display: panel: add YAML schema for LXD M9189A Rouven Czerwinski
@ 2024-10-26 12:29 ` Krzysztof Kozlowski
2026-02-16 13:54 ` Michael Tretter
0 siblings, 1 reply; 7+ messages in thread
From: Krzysztof Kozlowski @ 2024-10-26 12:29 UTC (permalink / raw)
To: Rouven Czerwinski
Cc: Jessica Zhang, Sam Ravnborg, dri-devel, devicetree, linux-kernel,
kernel, Neil Armstrong, David Airlie, Daniel Vetter,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann, Rob Herring,
Krzysztof Kozlowski, Conor Dooley
On Fri, Oct 25, 2024 at 04:11:28PM +0200, Rouven Czerwinski wrote:
A nit, subject: drop second/last, redundant "YAML schema for". The
"dt-bindings" prefix is already stating that these are bindings in
schema and YAML.
See also:
https://elixir.bootlin.com/linux/v6.7-rc8/source/Documentation/devicetree/bindings/submitting-patches.rst#L18
> +++ b/Documentation/devicetree/bindings/display/panel/lxd,m9189a.yaml
> @@ -0,0 +1,68 @@
> +# 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:
> + - Rouven Czerwinski <r.czerwinski@pengutronix.de>
> +
> +properties:
> + compatible:
> + const: lxd,m9189a
> +
> + reg:
> + maxItems: 1
> +
> + standby-gpios:
> + description: GPIO used for the standby pin
> + maxItems: 1
> +
> + reset-gpios:
> + description: GPIO used for the reset pin
> + maxItems: 1
> +
> + vdd-supply:
> + description: Power regulator
> +
> + backlight:
> + description: Backlight used by the panel
> + $ref: /schemas/types.yaml#/definitions/phandle
> +
> + port: true
This misses it's definition. You should reference proper panel schema in
top-level.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 3/3] drm/panel: add LXD M9189A panel driver
2024-10-25 14:11 ` [PATCH v2 3/3] drm/panel: add LXD M9189A panel driver Rouven Czerwinski
@ 2024-11-02 1:02 ` kernel test robot
0 siblings, 0 replies; 7+ messages in thread
From: kernel test robot @ 2024-11-02 1:02 UTC (permalink / raw)
To: Rouven Czerwinski, Jessica Zhang, Sam Ravnborg, linux-kernel, dri-devel
Cc: oe-kbuild-all, kernel, Rouven Czerwinski, Neil Armstrong,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Daniel Vetter
Hi Rouven,
kernel test robot noticed the following build errors:
[auto build test ERROR on c2ee9f594da826bea183ed14f2cc029c719bf4da]
url: https://github.com/intel-lab-lkp/linux/commits/Rouven-Czerwinski/dt-bindings-display-panel-add-YAML-schema-for-LXD-M9189A/20241025-221252
base: c2ee9f594da826bea183ed14f2cc029c719bf4da
patch link: https://lore.kernel.org/r/20241025141130.3179166-3-r.czerwinski%40pengutronix.de
patch subject: [PATCH v2 3/3] drm/panel: add LXD M9189A panel driver
config: arm-randconfig-r062-20241102 (https://download.01.org/0day-ci/archive/20241102/202411020816.Nb9aEvtO-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241102/202411020816.Nb9aEvtO-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202411020816.Nb9aEvtO-lkp@intel.com/
All errors (new ones prefixed by >>):
>> drivers/gpu/drm/panel/panel-lxd-m9189a.c:173:29: error: variable 'ret' is uninitialized when used here [-Werror,-Wuninitialized]
173 | return dev_err_probe(dev, ret, "Failed to get regulator\n");
| ^~~
drivers/gpu/drm/panel/panel-lxd-m9189a.c:165:9: note: initialize the variable 'ret' to silence this warning
165 | int ret;
| ^
| = 0
1 error generated.
vim +/ret +173 drivers/gpu/drm/panel/panel-lxd-m9189a.c
160
161 static int lxd_m9189_probe(struct mipi_dsi_device *dsi)
162 {
163 struct device *dev = &dsi->dev;
164 struct m9189_panel *m9189;
165 int ret;
166
167 m9189 = devm_kzalloc(dev, sizeof(*m9189), GFP_KERNEL);
168 if (!m9189)
169 return -ENOMEM;
170
171 m9189->supply = devm_regulator_get(dev, "vdd");
172 if (IS_ERR(m9189->supply))
> 173 return dev_err_probe(dev, ret, "Failed to get regulator\n");
174
175 m9189->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW);
176 if (IS_ERR(m9189->reset_gpio))
177 return dev_err_probe(dev, PTR_ERR(m9189->reset_gpio),
178 "Failed to get reset-gpios\n");
179
180 m9189->standby_gpio = devm_gpiod_get(dev, "standby", GPIOD_OUT_LOW);
181 if (IS_ERR(m9189->standby_gpio))
182 return dev_err_probe(dev, PTR_ERR(m9189->standby_gpio),
183 "Failed to get standby-gpios\n");
184
185 m9189->dsi = dsi;
186 mipi_dsi_set_drvdata(dsi, m9189);
187
188 dsi->lanes = 4;
189 dsi->format = MIPI_DSI_FMT_RGB888;
190 dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST;
191
192 drm_panel_init(&m9189->panel, dev, &m9189_panel_funcs,
193 DRM_MODE_CONNECTOR_DSI);
194 m9189->panel.prepare_prev_first = true;
195
196 ret = drm_panel_of_backlight(&m9189->panel);
197 if (ret)
198 return dev_err_probe(dev, ret, "Failed to get backlight\n");
199
200 drm_panel_add(&m9189->panel);
201
202 ret = mipi_dsi_attach(dsi);
203 if (ret < 0) {
204 dev_err_probe(dev, ret, "Failed to attach to DSI host\n");
205 drm_panel_remove(&m9189->panel);
206 return ret;
207 }
208
209 return 0;
210 }
211
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/3] dt-bindings: display: panel: add YAML schema for LXD M9189A
2024-10-26 12:29 ` Krzysztof Kozlowski
@ 2026-02-16 13:54 ` Michael Tretter
0 siblings, 0 replies; 7+ messages in thread
From: Michael Tretter @ 2026-02-16 13:54 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Rouven Czerwinski, Jessica Zhang, Sam Ravnborg, dri-devel,
devicetree, linux-kernel, kernel, Neil Armstrong, David Airlie,
Daniel Vetter, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, Rob Herring, Krzysztof Kozlowski,
Conor Dooley
On Sat, 26 Oct 2024 14:29:27 +0200, Krzysztof Kozlowski wrote:
> On Fri, Oct 25, 2024 at 04:11:28PM +0200, Rouven Czerwinski wrote:
>
> A nit, subject: drop second/last, redundant "YAML schema for". The
> "dt-bindings" prefix is already stating that these are bindings in
> schema and YAML.
> See also:
> https://elixir.bootlin.com/linux/v6.7-rc8/source/Documentation/devicetree/bindings/submitting-patches.rst#L18
Ack. I'll change the subject to "dt-bindings: display: panel: add LXD
M9189A" in v4.
>
> > +++ b/Documentation/devicetree/bindings/display/panel/lxd,m9189a.yaml
> > @@ -0,0 +1,68 @@
> > +# 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:
> > + - Rouven Czerwinski <r.czerwinski@pengutronix.de>
> > +
> > +properties:
> > + compatible:
> > + const: lxd,m9189a
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + standby-gpios:
> > + description: GPIO used for the standby pin
> > + maxItems: 1
> > +
> > + reset-gpios:
> > + description: GPIO used for the reset pin
> > + maxItems: 1
> > +
> > + vdd-supply:
> > + description: Power regulator
> > +
> > + backlight:
> > + description: Backlight used by the panel
> > + $ref: /schemas/types.yaml#/definitions/phandle
> > +
> > + port: true
>
> This misses it's definition. You should reference proper panel schema in
> top-level.
Fixed in v3 by referring to panel-common.yaml as base.
>
> Best regards,
> Krzysztof
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-02-16 13:54 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-25 14:11 [PATCH v2 1/3] dt-bindings: vendor-prefixes: Add lxd Rouven Czerwinski
2024-10-25 14:11 ` [PATCH v2 2/3] dt-bindings: display: panel: add YAML schema for LXD M9189A Rouven Czerwinski
2024-10-26 12:29 ` Krzysztof Kozlowski
2026-02-16 13:54 ` Michael Tretter
2024-10-25 14:11 ` [PATCH v2 3/3] drm/panel: add LXD M9189A panel driver Rouven Czerwinski
2024-11-02 1:02 ` kernel test robot
2024-10-26 12:27 ` [PATCH v2 1/3] dt-bindings: vendor-prefixes: Add lxd Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®