public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] drm/panel: switch panel registration to devm_drm_panel_add()
@ 2026-04-23 12:59 Myeonghun Pak
  2026-04-23 12:59 ` [PATCH v2 1/3] drm/panel: ilitek-ili9881c: use devm_drm_panel_add() Myeonghun Pak
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Myeonghun Pak @ 2026-04-23 12:59 UTC (permalink / raw)
  To: Neil Armstrong
  Cc: Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Sumit Semwal,
	Casey Connolly, dri-devel, linux-kernel, Myeonghun Pak

This respins the previous attach-failure fixes as a single series.

drm-misc-next now has devm_drm_panel_add() in commit e43a8e3ad8fa
("drm/panel: add devm_drm_panel_add() helper"), so convert the three
affected panel drivers to the managed helper instead of open-coding
drm_panel_remove() in their failure and remove paths.

Changes in v2:
- group the three related panel fixes into one series
- rebase onto drm-misc-next and use devm_drm_panel_add()
- drop manual drm_panel_remove() handling from probe/remove

Myeonghun Pak (3):
  drm/panel: ilitek-ili9881c: use devm_drm_panel_add()
  drm/panel: jdi-fhd-r63452: use devm_drm_panel_add()
  drm/panel: lg-sw43408: use devm_drm_panel_add()

 drivers/gpu/drm/panel/panel-ilitek-ili9881c.c |  7 +++----
 drivers/gpu/drm/panel/panel-jdi-fhd-r63452.c  |  7 +++----
 drivers/gpu/drm/panel/panel-lg-sw43408.c      | 10 +++++-----
 3 files changed, 11 insertions(+), 13 deletions(-)

-- 
2.47.1

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

* [PATCH v2 1/3] drm/panel: ilitek-ili9881c: use devm_drm_panel_add()
  2026-04-23 12:59 [PATCH v2 0/3] drm/panel: switch panel registration to devm_drm_panel_add() Myeonghun Pak
@ 2026-04-23 12:59 ` Myeonghun Pak
  2026-04-23 12:59 ` [PATCH v2 2/3] drm/panel: jdi-fhd-r63452: " Myeonghun Pak
  2026-04-23 12:59 ` [PATCH v2 3/3] drm/panel: lg-sw43408: " Myeonghun Pak
  2 siblings, 0 replies; 4+ messages in thread
From: Myeonghun Pak @ 2026-04-23 12:59 UTC (permalink / raw)
  To: Neil Armstrong
  Cc: Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Sumit Semwal,
	Casey Connolly, dri-devel, linux-kernel, Myeonghun Pak

Replace drm_panel_add()/drm_panel_remove() with devm_drm_panel_add()
now that drm-misc-next provides it. This keeps panel deregistration tied
to the device lifetime and removes the manual cleanup from the remove
callback.

Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
---
 drivers/gpu/drm/panel/panel-ilitek-ili9881c.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c
index 0652cdb57d..bc3cd9a182 100644
--- a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c
+++ b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c
@@ -2590,7 +2590,9 @@ static int ili9881c_dsi_probe(struct mipi_dsi_device *dsi)
 	if (ret)
 		return ret;
 
-	drm_panel_add(&ctx->panel);
+	ret = devm_drm_panel_add(&dsi->dev, &ctx->panel);
+	if (ret)
+		return dev_err_probe(&dsi->dev, ret, "Failed to add panel\n");
 
 	dsi->mode_flags = ctx->desc->mode_flags;
 	dsi->format = MIPI_DSI_FMT_RGB888;
@@ -2601,10 +2603,7 @@ static int ili9881c_dsi_probe(struct mipi_dsi_device *dsi)
 
 static void ili9881c_dsi_remove(struct mipi_dsi_device *dsi)
 {
-	struct ili9881c *ctx = mipi_dsi_get_drvdata(dsi);
-
 	mipi_dsi_detach(dsi);
-	drm_panel_remove(&ctx->panel);
 }
 
 static const struct ili9881c_desc lhr050h41_desc = {
-- 
2.47.1


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

* [PATCH v2 2/3] drm/panel: jdi-fhd-r63452: use devm_drm_panel_add()
  2026-04-23 12:59 [PATCH v2 0/3] drm/panel: switch panel registration to devm_drm_panel_add() Myeonghun Pak
  2026-04-23 12:59 ` [PATCH v2 1/3] drm/panel: ilitek-ili9881c: use devm_drm_panel_add() Myeonghun Pak
@ 2026-04-23 12:59 ` Myeonghun Pak
  2026-04-23 12:59 ` [PATCH v2 3/3] drm/panel: lg-sw43408: " Myeonghun Pak
  2 siblings, 0 replies; 4+ messages in thread
From: Myeonghun Pak @ 2026-04-23 12:59 UTC (permalink / raw)
  To: Neil Armstrong
  Cc: Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Sumit Semwal,
	Casey Connolly, dri-devel, linux-kernel, Myeonghun Pak

Replace drm_panel_add()/drm_panel_remove() with devm_drm_panel_add()
now that drm-misc-next provides it. This keeps panel deregistration tied
to the device lifetime and removes the manual cleanup from the remove
callback.

Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
---
 drivers/gpu/drm/panel/panel-jdi-fhd-r63452.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-jdi-fhd-r63452.c b/drivers/gpu/drm/panel/panel-jdi-fhd-r63452.c
index cbe354b51b..32822c5712 100644
--- a/drivers/gpu/drm/panel/panel-jdi-fhd-r63452.c
+++ b/drivers/gpu/drm/panel/panel-jdi-fhd-r63452.c
@@ -200,7 +200,9 @@ static int jdi_fhd_r63452_probe(struct mipi_dsi_device *dsi)
 	if (ret)
 		return dev_err_probe(dev, ret, "Failed to get backlight\n");
 
-	drm_panel_add(&ctx->panel);
+	ret = devm_drm_panel_add(dev, &ctx->panel);
+	if (ret)
+		return dev_err_probe(dev, ret, "Failed to add panel\n");
 
 	ret = mipi_dsi_attach(dsi);
 	if (ret < 0) {
@@ -213,14 +215,11 @@ static int jdi_fhd_r63452_probe(struct mipi_dsi_device *dsi)
 
 static void jdi_fhd_r63452_remove(struct mipi_dsi_device *dsi)
 {
-	struct jdi_fhd_r63452 *ctx = 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(&ctx->panel);
 }
 
 static const struct of_device_id jdi_fhd_r63452_of_match[] = {
-- 
2.47.1


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

* [PATCH v2 3/3] drm/panel: lg-sw43408: use devm_drm_panel_add()
  2026-04-23 12:59 [PATCH v2 0/3] drm/panel: switch panel registration to devm_drm_panel_add() Myeonghun Pak
  2026-04-23 12:59 ` [PATCH v2 1/3] drm/panel: ilitek-ili9881c: use devm_drm_panel_add() Myeonghun Pak
  2026-04-23 12:59 ` [PATCH v2 2/3] drm/panel: jdi-fhd-r63452: " Myeonghun Pak
@ 2026-04-23 12:59 ` Myeonghun Pak
  2 siblings, 0 replies; 4+ messages in thread
From: Myeonghun Pak @ 2026-04-23 12:59 UTC (permalink / raw)
  To: Neil Armstrong
  Cc: Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Sumit Semwal,
	Casey Connolly, dri-devel, linux-kernel, Myeonghun Pak

Replace drm_panel_add()/drm_panel_remove() with devm_drm_panel_add()
now that drm-misc-next provides it. This keeps panel deregistration tied
to the device lifetime and removes the manual cleanup from the remove
callback.

Signed-off-by: Myeonghun Pak <mhun512@gmail.com>
---
 drivers/gpu/drm/panel/panel-lg-sw43408.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-lg-sw43408.c b/drivers/gpu/drm/panel/panel-lg-sw43408.c
index 293826c500..8969f57b89 100644
--- a/drivers/gpu/drm/panel/panel-lg-sw43408.c
+++ b/drivers/gpu/drm/panel/panel-lg-sw43408.c
@@ -254,8 +254,11 @@ static int sw43408_add(struct sw43408_panel *ctx)
 
 	ctx->base.prepare_prev_first = true;
 
-	drm_panel_add(&ctx->base);
-	return ret;
+	ret = devm_drm_panel_add(dev, &ctx->base);
+	if (ret < 0)
+		return dev_err_probe(dev, ret, "Failed to add panel\n");
+
+	return 0;
 }
 
 static int sw43408_probe(struct mipi_dsi_device *dsi)
@@ -299,14 +302,11 @@ static int sw43408_probe(struct mipi_dsi_device *dsi)
 
 static void sw43408_remove(struct mipi_dsi_device *dsi)
 {
-	struct sw43408_panel *ctx = 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(&ctx->base);
 }
 
 static struct mipi_dsi_driver sw43408_driver = {
-- 
2.47.1


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

end of thread, other threads:[~2026-04-23 12:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-23 12:59 [PATCH v2 0/3] drm/panel: switch panel registration to devm_drm_panel_add() Myeonghun Pak
2026-04-23 12:59 ` [PATCH v2 1/3] drm/panel: ilitek-ili9881c: use devm_drm_panel_add() Myeonghun Pak
2026-04-23 12:59 ` [PATCH v2 2/3] drm/panel: jdi-fhd-r63452: " Myeonghun Pak
2026-04-23 12:59 ` [PATCH v2 3/3] drm/panel: lg-sw43408: " Myeonghun Pak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox