mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v1 0/5] drm/panel: r61307/r69328: minor updates
@ 2026-02-15  8:51 Svyatoslav Ryhel
  2026-02-15  8:51 ` [PATCH v1 1/5] drm/panel: r61307: align with schema property Svyatoslav Ryhel
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Svyatoslav Ryhel @ 2026-02-15  8:51 UTC (permalink / raw)
  To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Svyatoslav Ryhel
  Cc: dri-devel, linux-kernel

Align r61307 with schema property and update r61307/r69328 according
to latest DRM changes.

Svyatoslav Ryhel (5):
  drm/panel: r61307: align with schema property
  drm/panel: r61307/r69328: convert to
    drm_connector_helper_get_modes_fixed
  drm/panel: r61307/r69328: remove redundant checks
  drm/panel: r61307/r69328: return accumulated errors
  drm/panel: r61307/r69328: convert to devm_mipi_dsi_attach

 drivers/gpu/drm/panel/Kconfig                |  2 +
 drivers/gpu/drm/panel/panel-renesas-r61307.c | 40 ++++----------------
 drivers/gpu/drm/panel/panel-renesas-r69328.c | 38 +++----------------
 3 files changed, 15 insertions(+), 65 deletions(-)

-- 
2.51.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v1 1/5] drm/panel: r61307: align with schema property
  2026-02-15  8:51 [PATCH v1 0/5] drm/panel: r61307/r69328: minor updates Svyatoslav Ryhel
@ 2026-02-15  8:51 ` Svyatoslav Ryhel
  2026-02-16 16:13   ` Neil Armstrong
  2026-02-15  8:51 ` [PATCH v1 2/5] drm/panel: r61307/r69328: convert to drm_connector_helper_get_modes_fixed Svyatoslav Ryhel
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 12+ messages in thread
From: Svyatoslav Ryhel @ 2026-02-15  8:51 UTC (permalink / raw)
  To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Svyatoslav Ryhel
  Cc: dri-devel, linux-kernel

Rename renesas,inversion to renesas,column-inversion according to schema.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
 drivers/gpu/drm/panel/panel-renesas-r61307.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/panel/panel-renesas-r61307.c b/drivers/gpu/drm/panel/panel-renesas-r61307.c
index 319415194839..873ef856184b 100644
--- a/drivers/gpu/drm/panel/panel-renesas-r61307.c
+++ b/drivers/gpu/drm/panel/panel-renesas-r61307.c
@@ -259,7 +259,7 @@ static int renesas_r61307_probe(struct mipi_dsi_device *dsi)
 		return dev_err_probe(dev, PTR_ERR(priv->reset_gpio),
 				     "Failed to get reset gpios\n");
 
-	if (device_property_read_bool(dev, "renesas,inversion"))
+	if (device_property_read_bool(dev, "renesas,column-inversion"))
 		priv->inversion = true;
 
 	if (device_property_read_bool(dev, "renesas,contrast"))
-- 
2.51.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v1 2/5] drm/panel: r61307/r69328: convert to drm_connector_helper_get_modes_fixed
  2026-02-15  8:51 [PATCH v1 0/5] drm/panel: r61307/r69328: minor updates Svyatoslav Ryhel
  2026-02-15  8:51 ` [PATCH v1 1/5] drm/panel: r61307: align with schema property Svyatoslav Ryhel
@ 2026-02-15  8:51 ` Svyatoslav Ryhel
  2026-02-16 16:14   ` Neil Armstrong
  2026-02-15  8:51 ` [PATCH v1 3/5] drm/panel: r61307/r69328: remove redundant checks Svyatoslav Ryhel
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 12+ messages in thread
From: Svyatoslav Ryhel @ 2026-02-15  8:51 UTC (permalink / raw)
  To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Svyatoslav Ryhel
  Cc: dri-devel, linux-kernel

Switch to use of drm_connector_helper_get_modes_fixed helper for get_modes
operation.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
 drivers/gpu/drm/panel/Kconfig                |  2 ++
 drivers/gpu/drm/panel/panel-renesas-r61307.c | 17 +++--------------
 drivers/gpu/drm/panel/panel-renesas-r69328.c | 17 +++--------------
 3 files changed, 8 insertions(+), 28 deletions(-)

diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig
index 477c54c90b01..47de5f6a9143 100644
--- a/drivers/gpu/drm/panel/Kconfig
+++ b/drivers/gpu/drm/panel/Kconfig
@@ -700,6 +700,7 @@ config DRM_PANEL_RENESAS_R61307
 	depends on OF
 	depends on DRM_MIPI_DSI
 	depends on BACKLIGHT_CLASS_DEVICE
+	select VIDEOMODE_HELPERS
 	help
 	  Say Y here if you want to enable support for KOE tx13d100vm0eaa
 	  IPS-LCD module with Renesas R69328 IC. The panel has a 1024x768
@@ -713,6 +714,7 @@ config DRM_PANEL_RENESAS_R69328
 	depends on OF
 	depends on DRM_MIPI_DSI
 	depends on BACKLIGHT_CLASS_DEVICE
+	select VIDEOMODE_HELPERS
 	help
 	  Say Y here if you want to enable support for JDI dx12d100vm0eaa
 	  IPS-LCD module with Renesas R69328 IC. The panel has a 720x1280
diff --git a/drivers/gpu/drm/panel/panel-renesas-r61307.c b/drivers/gpu/drm/panel/panel-renesas-r61307.c
index 873ef856184b..45afa44af114 100644
--- a/drivers/gpu/drm/panel/panel-renesas-r61307.c
+++ b/drivers/gpu/drm/panel/panel-renesas-r61307.c
@@ -14,6 +14,7 @@
 #include <drm/drm_mipi_dsi.h>
 #include <drm/drm_modes.h>
 #include <drm/drm_panel.h>
+#include <drm/drm_probe_helper.h>
 
 #define R61307_MACP		0xb0 /* Manufacturer CMD Protect */
 #define   R61307_MACP_ON	0x03
@@ -202,25 +203,13 @@ static const struct drm_display_mode renesas_r61307_mode = {
 	.vtotal = 1024 + 24 + 8 + 2,
 	.width_mm = 76,
 	.height_mm = 101,
+	.type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED,
 };
 
 static int renesas_r61307_get_modes(struct drm_panel *panel,
 				    struct drm_connector *connector)
 {
-	struct drm_display_mode *mode;
-
-	mode = drm_mode_duplicate(connector->dev, &renesas_r61307_mode);
-	if (!mode)
-		return -ENOMEM;
-
-	drm_mode_set_name(mode);
-
-	mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
-	connector->display_info.width_mm = mode->width_mm;
-	connector->display_info.height_mm = mode->height_mm;
-	drm_mode_probed_add(connector, mode);
-
-	return 1;
+	return drm_connector_helper_get_modes_fixed(connector, &renesas_r61307_mode);
 }
 
 static const struct drm_panel_funcs renesas_r61307_panel_funcs = {
diff --git a/drivers/gpu/drm/panel/panel-renesas-r69328.c b/drivers/gpu/drm/panel/panel-renesas-r69328.c
index 46287ab04c30..b40bfd702fac 100644
--- a/drivers/gpu/drm/panel/panel-renesas-r69328.c
+++ b/drivers/gpu/drm/panel/panel-renesas-r69328.c
@@ -14,6 +14,7 @@
 #include <drm/drm_mipi_dsi.h>
 #include <drm/drm_modes.h>
 #include <drm/drm_panel.h>
+#include <drm/drm_probe_helper.h>
 
 #define R69328_MACP		0xb0 /* Manufacturer Access CMD Protect */
 #define   R69328_MACP_ON	0x03
@@ -167,25 +168,13 @@ static const struct drm_display_mode renesas_r69328_mode = {
 	.vtotal = 1280 + 6 + 3 + 1,
 	.width_mm = 59,
 	.height_mm = 105,
+	.type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED,
 };
 
 static int renesas_r69328_get_modes(struct drm_panel *panel,
 				    struct drm_connector *connector)
 {
-	struct drm_display_mode *mode;
-
-	mode = drm_mode_duplicate(connector->dev, &renesas_r69328_mode);
-	if (!mode)
-		return -ENOMEM;
-
-	drm_mode_set_name(mode);
-
-	mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
-	connector->display_info.width_mm = mode->width_mm;
-	connector->display_info.height_mm = mode->height_mm;
-	drm_mode_probed_add(connector, mode);
-
-	return 1;
+	return drm_connector_helper_get_modes_fixed(connector, &renesas_r69328_mode);
 }
 
 static const struct drm_panel_funcs renesas_r69328_panel_funcs = {
-- 
2.51.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v1 3/5] drm/panel: r61307/r69328: remove redundant checks
  2026-02-15  8:51 [PATCH v1 0/5] drm/panel: r61307/r69328: minor updates Svyatoslav Ryhel
  2026-02-15  8:51 ` [PATCH v1 1/5] drm/panel: r61307: align with schema property Svyatoslav Ryhel
  2026-02-15  8:51 ` [PATCH v1 2/5] drm/panel: r61307/r69328: convert to drm_connector_helper_get_modes_fixed Svyatoslav Ryhel
@ 2026-02-15  8:51 ` Svyatoslav Ryhel
  2026-02-16 16:14   ` Neil Armstrong
  2026-02-15  8:51 ` [PATCH v1 4/5] drm/panel: r61307/r69328: return accumulated errors Svyatoslav Ryhel
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 12+ messages in thread
From: Svyatoslav Ryhel @ 2026-02-15  8:51 UTC (permalink / raw)
  To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Svyatoslav Ryhel
  Cc: dri-devel, linux-kernel

This is now done by the DRM framework itself.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
 drivers/gpu/drm/panel/panel-renesas-r61307.c | 10 ----------
 drivers/gpu/drm/panel/panel-renesas-r69328.c | 10 ----------
 2 files changed, 20 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-renesas-r61307.c b/drivers/gpu/drm/panel/panel-renesas-r61307.c
index 45afa44af114..2cc3bd66d6d4 100644
--- a/drivers/gpu/drm/panel/panel-renesas-r61307.c
+++ b/drivers/gpu/drm/panel/panel-renesas-r61307.c
@@ -35,8 +35,6 @@ struct renesas_r61307 {
 
 	struct gpio_desc *reset_gpio;
 
-	bool prepared;
-
 	bool dig_cont_adj;
 	bool inversion;
 	u32 gamma;
@@ -92,9 +90,6 @@ static int renesas_r61307_prepare(struct drm_panel *panel)
 	struct device *dev = &priv->dsi->dev;
 	int ret;
 
-	if (priv->prepared)
-		return 0;
-
 	ret = regulator_enable(priv->vcc_supply);
 	if (ret) {
 		dev_err(dev, "failed to enable vcc power supply\n");
@@ -113,7 +108,6 @@ static int renesas_r61307_prepare(struct drm_panel *panel)
 
 	renesas_r61307_reset(priv);
 
-	priv->prepared = true;
 	return 0;
 }
 
@@ -175,9 +169,6 @@ static int renesas_r61307_unprepare(struct drm_panel *panel)
 {
 	struct renesas_r61307 *priv = to_renesas_r61307(panel);
 
-	if (!priv->prepared)
-		return 0;
-
 	usleep_range(10000, 11000);
 
 	gpiod_set_value_cansleep(priv->reset_gpio, 1);
@@ -187,7 +178,6 @@ static int renesas_r61307_unprepare(struct drm_panel *panel)
 	usleep_range(2000, 3000);
 	regulator_disable(priv->vcc_supply);
 
-	priv->prepared = false;
 	return 0;
 }
 
diff --git a/drivers/gpu/drm/panel/panel-renesas-r69328.c b/drivers/gpu/drm/panel/panel-renesas-r69328.c
index b40bfd702fac..b5fe127634ae 100644
--- a/drivers/gpu/drm/panel/panel-renesas-r69328.c
+++ b/drivers/gpu/drm/panel/panel-renesas-r69328.c
@@ -33,8 +33,6 @@ struct renesas_r69328 {
 	struct regulator *vdd_supply;
 	struct regulator *vddio_supply;
 	struct gpio_desc *reset_gpio;
-
-	bool prepared;
 };
 
 static inline struct renesas_r69328 *to_renesas_r69328(struct drm_panel *panel)
@@ -56,9 +54,6 @@ static int renesas_r69328_prepare(struct drm_panel *panel)
 	struct device *dev = &priv->dsi->dev;
 	int ret;
 
-	if (priv->prepared)
-		return 0;
-
 	ret = regulator_enable(priv->vdd_supply);
 	if (ret) {
 		dev_err(dev, "failed to enable vdd power supply\n");
@@ -77,7 +72,6 @@ static int renesas_r69328_prepare(struct drm_panel *panel)
 
 	renesas_r69328_reset(priv);
 
-	priv->prepared = true;
 	return 0;
 }
 
@@ -142,9 +136,6 @@ static int renesas_r69328_unprepare(struct drm_panel *panel)
 {
 	struct renesas_r69328 *priv = to_renesas_r69328(panel);
 
-	if (!priv->prepared)
-		return 0;
-
 	gpiod_set_value_cansleep(priv->reset_gpio, 1);
 
 	usleep_range(5000, 6000);
@@ -152,7 +143,6 @@ static int renesas_r69328_unprepare(struct drm_panel *panel)
 	regulator_disable(priv->vddio_supply);
 	regulator_disable(priv->vdd_supply);
 
-	priv->prepared = false;
 	return 0;
 }
 
-- 
2.51.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v1 4/5] drm/panel: r61307/r69328: return accumulated errors
  2026-02-15  8:51 [PATCH v1 0/5] drm/panel: r61307/r69328: minor updates Svyatoslav Ryhel
                   ` (2 preceding siblings ...)
  2026-02-15  8:51 ` [PATCH v1 3/5] drm/panel: r61307/r69328: remove redundant checks Svyatoslav Ryhel
@ 2026-02-15  8:51 ` Svyatoslav Ryhel
  2026-02-16 16:15   ` Neil Armstrong
  2026-02-15  8:51 ` [PATCH v1 5/5] drm/panel: r61307/r69328: convert to devm_mipi_dsi_attach Svyatoslav Ryhel
  2026-03-10 13:28 ` [PATCH v1 0/5] drm/panel: r61307/r69328: minor updates Neil Armstrong
  5 siblings, 1 reply; 12+ messages in thread
From: Svyatoslav Ryhel @ 2026-02-15  8:51 UTC (permalink / raw)
  To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Svyatoslav Ryhel
  Cc: dri-devel, linux-kernel

Return accumulated errors from dsi function calls.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
 drivers/gpu/drm/panel/panel-renesas-r61307.c | 4 ++--
 drivers/gpu/drm/panel/panel-renesas-r69328.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-renesas-r61307.c b/drivers/gpu/drm/panel/panel-renesas-r61307.c
index 2cc3bd66d6d4..70bda074dd0d 100644
--- a/drivers/gpu/drm/panel/panel-renesas-r61307.c
+++ b/drivers/gpu/drm/panel/panel-renesas-r61307.c
@@ -150,7 +150,7 @@ static int renesas_r61307_enable(struct drm_panel *panel)
 	mipi_dsi_dcs_set_display_on_multi(&ctx);
 	mipi_dsi_msleep(&ctx, 50);
 
-	return 0;
+	return ctx.accum_err;
 }
 
 static int renesas_r61307_disable(struct drm_panel *panel)
@@ -162,7 +162,7 @@ static int renesas_r61307_disable(struct drm_panel *panel)
 	mipi_dsi_msleep(&ctx, 100);
 	mipi_dsi_dcs_enter_sleep_mode_multi(&ctx);
 
-	return 0;
+	return ctx.accum_err;
 }
 
 static int renesas_r61307_unprepare(struct drm_panel *panel)
diff --git a/drivers/gpu/drm/panel/panel-renesas-r69328.c b/drivers/gpu/drm/panel/panel-renesas-r69328.c
index b5fe127634ae..0ed143f77e50 100644
--- a/drivers/gpu/drm/panel/panel-renesas-r69328.c
+++ b/drivers/gpu/drm/panel/panel-renesas-r69328.c
@@ -117,7 +117,7 @@ static int renesas_r69328_enable(struct drm_panel *panel)
 	mipi_dsi_dcs_set_display_on_multi(&ctx);
 	mipi_dsi_msleep(&ctx, 50);
 
-	return 0;
+	return ctx.accum_err;
 }
 
 static int renesas_r69328_disable(struct drm_panel *panel)
@@ -129,7 +129,7 @@ static int renesas_r69328_disable(struct drm_panel *panel)
 	mipi_dsi_msleep(&ctx, 60);
 	mipi_dsi_dcs_enter_sleep_mode_multi(&ctx);
 
-	return 0;
+	return ctx.accum_err;
 }
 
 static int renesas_r69328_unprepare(struct drm_panel *panel)
-- 
2.51.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH v1 5/5] drm/panel: r61307/r69328: convert to devm_mipi_dsi_attach
  2026-02-15  8:51 [PATCH v1 0/5] drm/panel: r61307/r69328: minor updates Svyatoslav Ryhel
                   ` (3 preceding siblings ...)
  2026-02-15  8:51 ` [PATCH v1 4/5] drm/panel: r61307/r69328: return accumulated errors Svyatoslav Ryhel
@ 2026-02-15  8:51 ` Svyatoslav Ryhel
  2026-02-16 16:16   ` Neil Armstrong
  2026-03-10 13:28 ` [PATCH v1 0/5] drm/panel: r61307/r69328: minor updates Neil Armstrong
  5 siblings, 1 reply; 12+ messages in thread
From: Svyatoslav Ryhel @ 2026-02-15  8:51 UTC (permalink / raw)
  To: Neil Armstrong, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Svyatoslav Ryhel
  Cc: dri-devel, linux-kernel

Switch to device managed version of mipi_dsi_attach.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
 drivers/gpu/drm/panel/panel-renesas-r61307.c | 7 +------
 drivers/gpu/drm/panel/panel-renesas-r69328.c | 7 +------
 2 files changed, 2 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-renesas-r61307.c b/drivers/gpu/drm/panel/panel-renesas-r61307.c
index 70bda074dd0d..d8185cc1b5d6 100644
--- a/drivers/gpu/drm/panel/panel-renesas-r61307.c
+++ b/drivers/gpu/drm/panel/panel-renesas-r61307.c
@@ -261,7 +261,7 @@ static int renesas_r61307_probe(struct mipi_dsi_device *dsi)
 
 	drm_panel_add(&priv->panel);
 
-	ret = mipi_dsi_attach(dsi);
+	ret = devm_mipi_dsi_attach(dev, dsi);
 	if (ret) {
 		drm_panel_remove(&priv->panel);
 		return dev_err_probe(dev, ret, "Failed to attach to DSI host\n");
@@ -273,11 +273,6 @@ static int renesas_r61307_probe(struct mipi_dsi_device *dsi)
 static void renesas_r61307_remove(struct mipi_dsi_device *dsi)
 {
 	struct renesas_r61307 *priv = mipi_dsi_get_drvdata(dsi);
-	int ret;
-
-	ret = mipi_dsi_detach(dsi);
-	if (ret)
-		dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret);
 
 	drm_panel_remove(&priv->panel);
 }
diff --git a/drivers/gpu/drm/panel/panel-renesas-r69328.c b/drivers/gpu/drm/panel/panel-renesas-r69328.c
index 0ed143f77e50..bfe2787f8f53 100644
--- a/drivers/gpu/drm/panel/panel-renesas-r69328.c
+++ b/drivers/gpu/drm/panel/panel-renesas-r69328.c
@@ -217,7 +217,7 @@ static int renesas_r69328_probe(struct mipi_dsi_device *dsi)
 
 	drm_panel_add(&priv->panel);
 
-	ret = mipi_dsi_attach(dsi);
+	ret = devm_mipi_dsi_attach(dev, dsi);
 	if (ret) {
 		drm_panel_remove(&priv->panel);
 		return dev_err_probe(dev, ret, "Failed to attach to DSI host\n");
@@ -229,11 +229,6 @@ static int renesas_r69328_probe(struct mipi_dsi_device *dsi)
 static void renesas_r69328_remove(struct mipi_dsi_device *dsi)
 {
 	struct renesas_r69328 *priv = mipi_dsi_get_drvdata(dsi);
-	int ret;
-
-	ret = mipi_dsi_detach(dsi);
-	if (ret)
-		dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret);
 
 	drm_panel_remove(&priv->panel);
 }
-- 
2.51.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v1 1/5] drm/panel: r61307: align with schema property
  2026-02-15  8:51 ` [PATCH v1 1/5] drm/panel: r61307: align with schema property Svyatoslav Ryhel
@ 2026-02-16 16:13   ` Neil Armstrong
  0 siblings, 0 replies; 12+ messages in thread
From: Neil Armstrong @ 2026-02-16 16:13 UTC (permalink / raw)
  To: Svyatoslav Ryhel, Jessica Zhang, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter
  Cc: dri-devel, linux-kernel

On 2/15/26 09:51, Svyatoslav Ryhel wrote:
> Rename renesas,inversion to renesas,column-inversion according to schema.
> 
> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> ---
>   drivers/gpu/drm/panel/panel-renesas-r61307.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/panel/panel-renesas-r61307.c b/drivers/gpu/drm/panel/panel-renesas-r61307.c
> index 319415194839..873ef856184b 100644
> --- a/drivers/gpu/drm/panel/panel-renesas-r61307.c
> +++ b/drivers/gpu/drm/panel/panel-renesas-r61307.c
> @@ -259,7 +259,7 @@ static int renesas_r61307_probe(struct mipi_dsi_device *dsi)
>   		return dev_err_probe(dev, PTR_ERR(priv->reset_gpio),
>   				     "Failed to get reset gpios\n");
>   
> -	if (device_property_read_bool(dev, "renesas,inversion"))
> +	if (device_property_read_bool(dev, "renesas,column-inversion"))
>   		priv->inversion = true;
>   
>   	if (device_property_read_bool(dev, "renesas,contrast"))

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

Thanks,
Neil

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v1 2/5] drm/panel: r61307/r69328: convert to drm_connector_helper_get_modes_fixed
  2026-02-15  8:51 ` [PATCH v1 2/5] drm/panel: r61307/r69328: convert to drm_connector_helper_get_modes_fixed Svyatoslav Ryhel
@ 2026-02-16 16:14   ` Neil Armstrong
  0 siblings, 0 replies; 12+ messages in thread
From: Neil Armstrong @ 2026-02-16 16:14 UTC (permalink / raw)
  To: Svyatoslav Ryhel, Jessica Zhang, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter
  Cc: dri-devel, linux-kernel

On 2/15/26 09:51, Svyatoslav Ryhel wrote:
> Switch to use of drm_connector_helper_get_modes_fixed helper for get_modes
> operation.
> 
> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> ---
>   drivers/gpu/drm/panel/Kconfig                |  2 ++
>   drivers/gpu/drm/panel/panel-renesas-r61307.c | 17 +++--------------
>   drivers/gpu/drm/panel/panel-renesas-r69328.c | 17 +++--------------
>   3 files changed, 8 insertions(+), 28 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig
> index 477c54c90b01..47de5f6a9143 100644
> --- a/drivers/gpu/drm/panel/Kconfig
> +++ b/drivers/gpu/drm/panel/Kconfig
> @@ -700,6 +700,7 @@ config DRM_PANEL_RENESAS_R61307
>   	depends on OF
>   	depends on DRM_MIPI_DSI
>   	depends on BACKLIGHT_CLASS_DEVICE
> +	select VIDEOMODE_HELPERS
>   	help
>   	  Say Y here if you want to enable support for KOE tx13d100vm0eaa
>   	  IPS-LCD module with Renesas R69328 IC. The panel has a 1024x768
> @@ -713,6 +714,7 @@ config DRM_PANEL_RENESAS_R69328
>   	depends on OF
>   	depends on DRM_MIPI_DSI
>   	depends on BACKLIGHT_CLASS_DEVICE
> +	select VIDEOMODE_HELPERS
>   	help
>   	  Say Y here if you want to enable support for JDI dx12d100vm0eaa
>   	  IPS-LCD module with Renesas R69328 IC. The panel has a 720x1280
> diff --git a/drivers/gpu/drm/panel/panel-renesas-r61307.c b/drivers/gpu/drm/panel/panel-renesas-r61307.c
> index 873ef856184b..45afa44af114 100644
> --- a/drivers/gpu/drm/panel/panel-renesas-r61307.c
> +++ b/drivers/gpu/drm/panel/panel-renesas-r61307.c
> @@ -14,6 +14,7 @@
>   #include <drm/drm_mipi_dsi.h>
>   #include <drm/drm_modes.h>
>   #include <drm/drm_panel.h>
> +#include <drm/drm_probe_helper.h>
>   
>   #define R61307_MACP		0xb0 /* Manufacturer CMD Protect */
>   #define   R61307_MACP_ON	0x03
> @@ -202,25 +203,13 @@ static const struct drm_display_mode renesas_r61307_mode = {
>   	.vtotal = 1024 + 24 + 8 + 2,
>   	.width_mm = 76,
>   	.height_mm = 101,
> +	.type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED,
>   };
>   
>   static int renesas_r61307_get_modes(struct drm_panel *panel,
>   				    struct drm_connector *connector)
>   {
> -	struct drm_display_mode *mode;
> -
> -	mode = drm_mode_duplicate(connector->dev, &renesas_r61307_mode);
> -	if (!mode)
> -		return -ENOMEM;
> -
> -	drm_mode_set_name(mode);
> -
> -	mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
> -	connector->display_info.width_mm = mode->width_mm;
> -	connector->display_info.height_mm = mode->height_mm;
> -	drm_mode_probed_add(connector, mode);
> -
> -	return 1;
> +	return drm_connector_helper_get_modes_fixed(connector, &renesas_r61307_mode);
>   }
>   
>   static const struct drm_panel_funcs renesas_r61307_panel_funcs = {
> diff --git a/drivers/gpu/drm/panel/panel-renesas-r69328.c b/drivers/gpu/drm/panel/panel-renesas-r69328.c
> index 46287ab04c30..b40bfd702fac 100644
> --- a/drivers/gpu/drm/panel/panel-renesas-r69328.c
> +++ b/drivers/gpu/drm/panel/panel-renesas-r69328.c
> @@ -14,6 +14,7 @@
>   #include <drm/drm_mipi_dsi.h>
>   #include <drm/drm_modes.h>
>   #include <drm/drm_panel.h>
> +#include <drm/drm_probe_helper.h>
>   
>   #define R69328_MACP		0xb0 /* Manufacturer Access CMD Protect */
>   #define   R69328_MACP_ON	0x03
> @@ -167,25 +168,13 @@ static const struct drm_display_mode renesas_r69328_mode = {
>   	.vtotal = 1280 + 6 + 3 + 1,
>   	.width_mm = 59,
>   	.height_mm = 105,
> +	.type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED,
>   };
>   
>   static int renesas_r69328_get_modes(struct drm_panel *panel,
>   				    struct drm_connector *connector)
>   {
> -	struct drm_display_mode *mode;
> -
> -	mode = drm_mode_duplicate(connector->dev, &renesas_r69328_mode);
> -	if (!mode)
> -		return -ENOMEM;
> -
> -	drm_mode_set_name(mode);
> -
> -	mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
> -	connector->display_info.width_mm = mode->width_mm;
> -	connector->display_info.height_mm = mode->height_mm;
> -	drm_mode_probed_add(connector, mode);
> -
> -	return 1;
> +	return drm_connector_helper_get_modes_fixed(connector, &renesas_r69328_mode);
>   }
>   
>   static const struct drm_panel_funcs renesas_r69328_panel_funcs = {

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

Thanks,
Neil

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v1 3/5] drm/panel: r61307/r69328: remove redundant checks
  2026-02-15  8:51 ` [PATCH v1 3/5] drm/panel: r61307/r69328: remove redundant checks Svyatoslav Ryhel
@ 2026-02-16 16:14   ` Neil Armstrong
  0 siblings, 0 replies; 12+ messages in thread
From: Neil Armstrong @ 2026-02-16 16:14 UTC (permalink / raw)
  To: Svyatoslav Ryhel, Jessica Zhang, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter
  Cc: dri-devel, linux-kernel

On 2/15/26 09:51, Svyatoslav Ryhel wrote:
> This is now done by the DRM framework itself.
> 
> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> ---
>   drivers/gpu/drm/panel/panel-renesas-r61307.c | 10 ----------
>   drivers/gpu/drm/panel/panel-renesas-r69328.c | 10 ----------
>   2 files changed, 20 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panel/panel-renesas-r61307.c b/drivers/gpu/drm/panel/panel-renesas-r61307.c
> index 45afa44af114..2cc3bd66d6d4 100644
> --- a/drivers/gpu/drm/panel/panel-renesas-r61307.c
> +++ b/drivers/gpu/drm/panel/panel-renesas-r61307.c
> @@ -35,8 +35,6 @@ struct renesas_r61307 {
>   
>   	struct gpio_desc *reset_gpio;
>   
> -	bool prepared;
> -
>   	bool dig_cont_adj;
>   	bool inversion;
>   	u32 gamma;
> @@ -92,9 +90,6 @@ static int renesas_r61307_prepare(struct drm_panel *panel)
>   	struct device *dev = &priv->dsi->dev;
>   	int ret;
>   
> -	if (priv->prepared)
> -		return 0;
> -
>   	ret = regulator_enable(priv->vcc_supply);
>   	if (ret) {
>   		dev_err(dev, "failed to enable vcc power supply\n");
> @@ -113,7 +108,6 @@ static int renesas_r61307_prepare(struct drm_panel *panel)
>   
>   	renesas_r61307_reset(priv);
>   
> -	priv->prepared = true;
>   	return 0;
>   }
>   
> @@ -175,9 +169,6 @@ static int renesas_r61307_unprepare(struct drm_panel *panel)
>   {
>   	struct renesas_r61307 *priv = to_renesas_r61307(panel);
>   
> -	if (!priv->prepared)
> -		return 0;
> -
>   	usleep_range(10000, 11000);
>   
>   	gpiod_set_value_cansleep(priv->reset_gpio, 1);
> @@ -187,7 +178,6 @@ static int renesas_r61307_unprepare(struct drm_panel *panel)
>   	usleep_range(2000, 3000);
>   	regulator_disable(priv->vcc_supply);
>   
> -	priv->prepared = false;
>   	return 0;
>   }
>   
> diff --git a/drivers/gpu/drm/panel/panel-renesas-r69328.c b/drivers/gpu/drm/panel/panel-renesas-r69328.c
> index b40bfd702fac..b5fe127634ae 100644
> --- a/drivers/gpu/drm/panel/panel-renesas-r69328.c
> +++ b/drivers/gpu/drm/panel/panel-renesas-r69328.c
> @@ -33,8 +33,6 @@ struct renesas_r69328 {
>   	struct regulator *vdd_supply;
>   	struct regulator *vddio_supply;
>   	struct gpio_desc *reset_gpio;
> -
> -	bool prepared;
>   };
>   
>   static inline struct renesas_r69328 *to_renesas_r69328(struct drm_panel *panel)
> @@ -56,9 +54,6 @@ static int renesas_r69328_prepare(struct drm_panel *panel)
>   	struct device *dev = &priv->dsi->dev;
>   	int ret;
>   
> -	if (priv->prepared)
> -		return 0;
> -
>   	ret = regulator_enable(priv->vdd_supply);
>   	if (ret) {
>   		dev_err(dev, "failed to enable vdd power supply\n");
> @@ -77,7 +72,6 @@ static int renesas_r69328_prepare(struct drm_panel *panel)
>   
>   	renesas_r69328_reset(priv);
>   
> -	priv->prepared = true;
>   	return 0;
>   }
>   
> @@ -142,9 +136,6 @@ static int renesas_r69328_unprepare(struct drm_panel *panel)
>   {
>   	struct renesas_r69328 *priv = to_renesas_r69328(panel);
>   
> -	if (!priv->prepared)
> -		return 0;
> -
>   	gpiod_set_value_cansleep(priv->reset_gpio, 1);
>   
>   	usleep_range(5000, 6000);
> @@ -152,7 +143,6 @@ static int renesas_r69328_unprepare(struct drm_panel *panel)
>   	regulator_disable(priv->vddio_supply);
>   	regulator_disable(priv->vdd_supply);
>   
> -	priv->prepared = false;
>   	return 0;
>   }
>   

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

Thanks,
Neil

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v1 4/5] drm/panel: r61307/r69328: return accumulated errors
  2026-02-15  8:51 ` [PATCH v1 4/5] drm/panel: r61307/r69328: return accumulated errors Svyatoslav Ryhel
@ 2026-02-16 16:15   ` Neil Armstrong
  0 siblings, 0 replies; 12+ messages in thread
From: Neil Armstrong @ 2026-02-16 16:15 UTC (permalink / raw)
  To: Svyatoslav Ryhel, Jessica Zhang, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter
  Cc: dri-devel, linux-kernel

On 2/15/26 09:51, Svyatoslav Ryhel wrote:
> Return accumulated errors from dsi function calls.
> 
> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> ---
>   drivers/gpu/drm/panel/panel-renesas-r61307.c | 4 ++--
>   drivers/gpu/drm/panel/panel-renesas-r69328.c | 4 ++--
>   2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panel/panel-renesas-r61307.c b/drivers/gpu/drm/panel/panel-renesas-r61307.c
> index 2cc3bd66d6d4..70bda074dd0d 100644
> --- a/drivers/gpu/drm/panel/panel-renesas-r61307.c
> +++ b/drivers/gpu/drm/panel/panel-renesas-r61307.c
> @@ -150,7 +150,7 @@ static int renesas_r61307_enable(struct drm_panel *panel)
>   	mipi_dsi_dcs_set_display_on_multi(&ctx);
>   	mipi_dsi_msleep(&ctx, 50);
>   
> -	return 0;
> +	return ctx.accum_err;
>   }
>   
>   static int renesas_r61307_disable(struct drm_panel *panel)
> @@ -162,7 +162,7 @@ static int renesas_r61307_disable(struct drm_panel *panel)
>   	mipi_dsi_msleep(&ctx, 100);
>   	mipi_dsi_dcs_enter_sleep_mode_multi(&ctx);
>   
> -	return 0;
> +	return ctx.accum_err;
>   }
>   
>   static int renesas_r61307_unprepare(struct drm_panel *panel)
> diff --git a/drivers/gpu/drm/panel/panel-renesas-r69328.c b/drivers/gpu/drm/panel/panel-renesas-r69328.c
> index b5fe127634ae..0ed143f77e50 100644
> --- a/drivers/gpu/drm/panel/panel-renesas-r69328.c
> +++ b/drivers/gpu/drm/panel/panel-renesas-r69328.c
> @@ -117,7 +117,7 @@ static int renesas_r69328_enable(struct drm_panel *panel)
>   	mipi_dsi_dcs_set_display_on_multi(&ctx);
>   	mipi_dsi_msleep(&ctx, 50);
>   
> -	return 0;
> +	return ctx.accum_err;
>   }
>   
>   static int renesas_r69328_disable(struct drm_panel *panel)
> @@ -129,7 +129,7 @@ static int renesas_r69328_disable(struct drm_panel *panel)
>   	mipi_dsi_msleep(&ctx, 60);
>   	mipi_dsi_dcs_enter_sleep_mode_multi(&ctx);
>   
> -	return 0;
> +	return ctx.accum_err;
>   }
>   
>   static int renesas_r69328_unprepare(struct drm_panel *panel)

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

Thanks,
Neil

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v1 5/5] drm/panel: r61307/r69328: convert to devm_mipi_dsi_attach
  2026-02-15  8:51 ` [PATCH v1 5/5] drm/panel: r61307/r69328: convert to devm_mipi_dsi_attach Svyatoslav Ryhel
@ 2026-02-16 16:16   ` Neil Armstrong
  0 siblings, 0 replies; 12+ messages in thread
From: Neil Armstrong @ 2026-02-16 16:16 UTC (permalink / raw)
  To: Svyatoslav Ryhel, Jessica Zhang, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter
  Cc: dri-devel, linux-kernel

On 2/15/26 09:51, Svyatoslav Ryhel wrote:
> Switch to device managed version of mipi_dsi_attach.
> 
> Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
> ---
>   drivers/gpu/drm/panel/panel-renesas-r61307.c | 7 +------
>   drivers/gpu/drm/panel/panel-renesas-r69328.c | 7 +------
>   2 files changed, 2 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panel/panel-renesas-r61307.c b/drivers/gpu/drm/panel/panel-renesas-r61307.c
> index 70bda074dd0d..d8185cc1b5d6 100644
> --- a/drivers/gpu/drm/panel/panel-renesas-r61307.c
> +++ b/drivers/gpu/drm/panel/panel-renesas-r61307.c
> @@ -261,7 +261,7 @@ static int renesas_r61307_probe(struct mipi_dsi_device *dsi)
>   
>   	drm_panel_add(&priv->panel);
>   
> -	ret = mipi_dsi_attach(dsi);
> +	ret = devm_mipi_dsi_attach(dev, dsi);
>   	if (ret) {
>   		drm_panel_remove(&priv->panel);
>   		return dev_err_probe(dev, ret, "Failed to attach to DSI host\n");
> @@ -273,11 +273,6 @@ static int renesas_r61307_probe(struct mipi_dsi_device *dsi)
>   static void renesas_r61307_remove(struct mipi_dsi_device *dsi)
>   {
>   	struct renesas_r61307 *priv = mipi_dsi_get_drvdata(dsi);
> -	int ret;
> -
> -	ret = mipi_dsi_detach(dsi);
> -	if (ret)
> -		dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret);
>   
>   	drm_panel_remove(&priv->panel);
>   }
> diff --git a/drivers/gpu/drm/panel/panel-renesas-r69328.c b/drivers/gpu/drm/panel/panel-renesas-r69328.c
> index 0ed143f77e50..bfe2787f8f53 100644
> --- a/drivers/gpu/drm/panel/panel-renesas-r69328.c
> +++ b/drivers/gpu/drm/panel/panel-renesas-r69328.c
> @@ -217,7 +217,7 @@ static int renesas_r69328_probe(struct mipi_dsi_device *dsi)
>   
>   	drm_panel_add(&priv->panel);
>   
> -	ret = mipi_dsi_attach(dsi);
> +	ret = devm_mipi_dsi_attach(dev, dsi);
>   	if (ret) {
>   		drm_panel_remove(&priv->panel);
>   		return dev_err_probe(dev, ret, "Failed to attach to DSI host\n");
> @@ -229,11 +229,6 @@ static int renesas_r69328_probe(struct mipi_dsi_device *dsi)
>   static void renesas_r69328_remove(struct mipi_dsi_device *dsi)
>   {
>   	struct renesas_r69328 *priv = mipi_dsi_get_drvdata(dsi);
> -	int ret;
> -
> -	ret = mipi_dsi_detach(dsi);
> -	if (ret)
> -		dev_err(&dsi->dev, "Failed to detach from DSI host: %d\n", ret);
>   
>   	drm_panel_remove(&priv->panel);
>   }


Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

Thanks,
Neil

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH v1 0/5] drm/panel: r61307/r69328: minor updates
  2026-02-15  8:51 [PATCH v1 0/5] drm/panel: r61307/r69328: minor updates Svyatoslav Ryhel
                   ` (4 preceding siblings ...)
  2026-02-15  8:51 ` [PATCH v1 5/5] drm/panel: r61307/r69328: convert to devm_mipi_dsi_attach Svyatoslav Ryhel
@ 2026-03-10 13:28 ` Neil Armstrong
  5 siblings, 0 replies; 12+ messages in thread
From: Neil Armstrong @ 2026-03-10 13:28 UTC (permalink / raw)
  To: Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Svyatoslav Ryhel
  Cc: dri-devel, linux-kernel

Hi,

On Sun, 15 Feb 2026 10:51:34 +0200, Svyatoslav Ryhel wrote:
> Align r61307 with schema property and update r61307/r69328 according
> to latest DRM changes.
> 
> Svyatoslav Ryhel (5):
>   drm/panel: r61307: align with schema property
>   drm/panel: r61307/r69328: convert to
>     drm_connector_helper_get_modes_fixed
>   drm/panel: r61307/r69328: remove redundant checks
>   drm/panel: r61307/r69328: return accumulated errors
>   drm/panel: r61307/r69328: convert to devm_mipi_dsi_attach
> 
> [...]

Thanks, Applied to https://gitlab.freedesktop.org/drm/misc/kernel.git (drm-misc-next)

[1/5] drm/panel: r61307: align with schema property
      https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/c1a4c55d75c0471710f444f56527f5bce9739c7e
[2/5] drm/panel: r61307/r69328: convert to drm_connector_helper_get_modes_fixed
      https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/839ed86975721a428f4798c52cf167349164b2fb
[3/5] drm/panel: r61307/r69328: remove redundant checks
      https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/1f8ba5e3508d17fef2602cb2826426afe593de78
[4/5] drm/panel: r61307/r69328: return accumulated errors
      https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/a4ad5575ce195d2a49a302e823cd42aa5c4133d5
[5/5] drm/panel: r61307/r69328: convert to devm_mipi_dsi_attach
      https://gitlab.freedesktop.org/drm/misc/kernel/-/commit/3efe01ff79041fe64a6f6637191b69abf310fd0d

-- 
Neil


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-03-10 13:28 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-15  8:51 [PATCH v1 0/5] drm/panel: r61307/r69328: minor updates Svyatoslav Ryhel
2026-02-15  8:51 ` [PATCH v1 1/5] drm/panel: r61307: align with schema property Svyatoslav Ryhel
2026-02-16 16:13   ` Neil Armstrong
2026-02-15  8:51 ` [PATCH v1 2/5] drm/panel: r61307/r69328: convert to drm_connector_helper_get_modes_fixed Svyatoslav Ryhel
2026-02-16 16:14   ` Neil Armstrong
2026-02-15  8:51 ` [PATCH v1 3/5] drm/panel: r61307/r69328: remove redundant checks Svyatoslav Ryhel
2026-02-16 16:14   ` Neil Armstrong
2026-02-15  8:51 ` [PATCH v1 4/5] drm/panel: r61307/r69328: return accumulated errors Svyatoslav Ryhel
2026-02-16 16:15   ` Neil Armstrong
2026-02-15  8:51 ` [PATCH v1 5/5] drm/panel: r61307/r69328: convert to devm_mipi_dsi_attach Svyatoslav Ryhel
2026-02-16 16:16   ` Neil Armstrong
2026-03-10 13:28 ` [PATCH v1 0/5] drm/panel: r61307/r69328: minor updates Neil Armstrong

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®