The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH v2 1/6] drm/panel: Use devm_mipi_dsi_attach in BOE panels
@ 2026-08-11 16:50 Osama Abdelkader
  2026-08-12 11:50 ` Neil Armstrong
  0 siblings, 1 reply; 3+ messages in thread
From: Osama Abdelkader @ 2026-08-11 16:50 UTC (permalink / raw)
  To: luca.ceresoli, Neil Armstrong, Jessica Zhang, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	Jerry Han, dri-devel, linux-kernel
  Cc: Osama Abdelkader

Use the managed MIPI DSI attach helper in BOE panel drivers and drop the
corresponding manual detach calls from remove paths.

Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>

v2:
- break long description lines.
- add Signed-off-by tag
---
 drivers/gpu/drm/panel/panel-boe-bf060y8m-aj0.c       | 8 +-------
 drivers/gpu/drm/panel/panel-boe-himax8279d.c         | 8 +-------
 drivers/gpu/drm/panel/panel-boe-td4320.c             | 8 +-------
 drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c | 4 +---
 drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c       | 8 +-------
 drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c       | 7 +------
 6 files changed, 6 insertions(+), 37 deletions(-)

diff --git a/drivers/gpu/drm/panel/panel-boe-bf060y8m-aj0.c b/drivers/gpu/drm/panel/panel-boe-bf060y8m-aj0.c
index 84c21c62a43e..6a74523a6614 100644
--- a/drivers/gpu/drm/panel/panel-boe-bf060y8m-aj0.c
+++ b/drivers/gpu/drm/panel/panel-boe-bf060y8m-aj0.c
@@ -359,7 +359,7 @@ static int boe_bf060y8m_aj0_probe(struct mipi_dsi_device *dsi)
 
 	drm_panel_add(&boe->panel);
 
-	ret = mipi_dsi_attach(dsi);
+	ret = devm_mipi_dsi_attach(&dsi->dev, dsi);
 	if (ret < 0) {
 		dev_err(dev, "Failed to attach to DSI host: %d\n", ret);
 		return ret;
@@ -371,12 +371,6 @@ static int boe_bf060y8m_aj0_probe(struct mipi_dsi_device *dsi)
 static void boe_bf060y8m_aj0_remove(struct mipi_dsi_device *dsi)
 {
 	struct boe_bf060y8m_aj0 *boe = 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(&boe->panel);
 }
 
diff --git a/drivers/gpu/drm/panel/panel-boe-himax8279d.c b/drivers/gpu/drm/panel/panel-boe-himax8279d.c
index 4a8560b4b899..ffcb63f65b75 100644
--- a/drivers/gpu/drm/panel/panel-boe-himax8279d.c
+++ b/drivers/gpu/drm/panel/panel-boe-himax8279d.c
@@ -881,7 +881,7 @@ static int panel_probe(struct mipi_dsi_device *dsi)
 	if (err < 0)
 		return err;
 
-	err = mipi_dsi_attach(dsi);
+	err = devm_mipi_dsi_attach(&dsi->dev, dsi);
 	if (err < 0)
 		drm_panel_remove(&pinfo->base);
 
@@ -891,12 +891,6 @@ static int panel_probe(struct mipi_dsi_device *dsi)
 static void panel_remove(struct mipi_dsi_device *dsi)
 {
 	struct panel_info *pinfo = mipi_dsi_get_drvdata(dsi);
-	int err;
-
-	err = mipi_dsi_detach(dsi);
-	if (err < 0)
-		dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", err);
-
 	drm_panel_remove(&pinfo->base);
 }
 
diff --git a/drivers/gpu/drm/panel/panel-boe-td4320.c b/drivers/gpu/drm/panel/panel-boe-td4320.c
index 23558a76dd72..704d5a9c13e7 100644
--- a/drivers/gpu/drm/panel/panel-boe-td4320.c
+++ b/drivers/gpu/drm/panel/panel-boe-td4320.c
@@ -204,7 +204,7 @@ static int boe_td4320_probe(struct mipi_dsi_device *dsi)
 
 	drm_panel_add(&ctx->panel);
 
-	ret = mipi_dsi_attach(dsi);
+	ret = devm_mipi_dsi_attach(&dsi->dev, dsi);
 	if (ret < 0) {
 		drm_panel_remove(&ctx->panel);
 		return dev_err_probe(dev, ret, "Failed to attach to DSI host\n");
@@ -216,12 +216,6 @@ static int boe_td4320_probe(struct mipi_dsi_device *dsi)
 static void boe_td4320_remove(struct mipi_dsi_device *dsi)
 {
 	struct boe_td4320 *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);
 }
 
diff --git a/drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c b/drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c
index a70a2e58f88c..94cc675973e6 100644
--- a/drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c
+++ b/drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c
@@ -393,7 +393,7 @@ static int boe_th101mb31ig002_dsi_probe(struct mipi_dsi_device *dsi)
 
 	drm_panel_add(&ctx->panel);
 
-	ret = mipi_dsi_attach(dsi);
+	ret = devm_mipi_dsi_attach(&dsi->dev, dsi);
 	if (ret < 0) {
 		dev_err_probe(&dsi->dev, ret,
 			      "Failed to attach panel to DSI host\n");
@@ -407,8 +407,6 @@ static int boe_th101mb31ig002_dsi_probe(struct mipi_dsi_device *dsi)
 static void boe_th101mb31ig002_dsi_remove(struct mipi_dsi_device *dsi)
 {
 	struct boe_th101mb31ig002 *ctx = mipi_dsi_get_drvdata(dsi);
-
-	mipi_dsi_detach(dsi);
 	drm_panel_remove(&ctx->panel);
 }
 
diff --git a/drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c b/drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c
index 20b6e11a7d84..2ab7764d4094 100644
--- a/drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c
+++ b/drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c
@@ -200,7 +200,7 @@ static int boe_tv101wum_ll2_probe(struct mipi_dsi_device *dsi)
 
 	drm_panel_add(&ctx->panel);
 
-	ret = mipi_dsi_attach(dsi);
+	ret = devm_mipi_dsi_attach(&dsi->dev, dsi);
 	if (ret < 0) {
 		drm_panel_remove(&ctx->panel);
 		return dev_err_probe(dev, ret, "Failed to attach to DSI host\n");
@@ -212,12 +212,6 @@ static int boe_tv101wum_ll2_probe(struct mipi_dsi_device *dsi)
 static void boe_tv101wum_ll2_remove(struct mipi_dsi_device *dsi)
 {
 	struct boe_tv101wum_ll2 *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);
 }
 
diff --git a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
index 150dff3ab6c3..7d2672578dd8 100644
--- a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
+++ b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
@@ -1765,7 +1765,7 @@ static int boe_panel_probe(struct mipi_dsi_device *dsi)
 
 	mipi_dsi_set_drvdata(dsi, boe);
 
-	ret = mipi_dsi_attach(dsi);
+	ret = devm_mipi_dsi_attach(&dsi->dev, dsi);
 	if (ret)
 		drm_panel_remove(&boe->base);
 
@@ -1775,11 +1775,6 @@ static int boe_panel_probe(struct mipi_dsi_device *dsi)
 static void boe_panel_remove(struct mipi_dsi_device *dsi)
 {
 	struct boe_panel *boe = 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);
 
 	if (boe->base.dev)
 		drm_panel_remove(&boe->base);
-- 
2.43.0


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

* Re: [PATCH v2 1/6] drm/panel: Use devm_mipi_dsi_attach in BOE panels
  2026-08-11 16:50 [PATCH v2 1/6] drm/panel: Use devm_mipi_dsi_attach in BOE panels Osama Abdelkader
@ 2026-08-12 11:50 ` Neil Armstrong
  2026-08-12 13:06   ` Osama Abdelkader
  0 siblings, 1 reply; 3+ messages in thread
From: Neil Armstrong @ 2026-08-12 11:50 UTC (permalink / raw)
  To: Osama Abdelkader, luca.ceresoli, Jessica Zhang, Maarten Lankhorst,
	Maxime Ripard, Thomas Zimmermann, David Airlie, Simona Vetter,
	Jerry Han, dri-devel, linux-kernel

Hi,

On 8/11/26 18:50, Osama Abdelkader wrote:
> Use the managed MIPI DSI attach helper in BOE panel drivers and drop the
> corresponding manual detach calls from remove paths.
> 
> Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
> 
> v2:
> - break long description lines.
> - add Signed-off-by tag

Please move the changelog after the ---, or use a tool like b4 to handle that
automatically.

> ---
>   drivers/gpu/drm/panel/panel-boe-bf060y8m-aj0.c       | 8 +-------
>   drivers/gpu/drm/panel/panel-boe-himax8279d.c         | 8 +-------
>   drivers/gpu/drm/panel/panel-boe-td4320.c             | 8 +-------
>   drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c | 4 +---
>   drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c       | 8 +-------
>   drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c       | 7 +------
>   6 files changed, 6 insertions(+), 37 deletions(-)
> 
> diff --git a/drivers/gpu/drm/panel/panel-boe-bf060y8m-aj0.c b/drivers/gpu/drm/panel/panel-boe-bf060y8m-aj0.c
> index 84c21c62a43e..6a74523a6614 100644
> --- a/drivers/gpu/drm/panel/panel-boe-bf060y8m-aj0.c
> +++ b/drivers/gpu/drm/panel/panel-boe-bf060y8m-aj0.c
> @@ -359,7 +359,7 @@ static int boe_bf060y8m_aj0_probe(struct mipi_dsi_device *dsi)
>   
>   	drm_panel_add(&boe->panel);
>   
> -	ret = mipi_dsi_attach(dsi);
> +	ret = devm_mipi_dsi_attach(&dsi->dev, dsi);
>   	if (ret < 0) {
>   		dev_err(dev, "Failed to attach to DSI host: %d\n", ret);
>   		return ret;
> @@ -371,12 +371,6 @@ static int boe_bf060y8m_aj0_probe(struct mipi_dsi_device *dsi)
>   static void boe_bf060y8m_aj0_remove(struct mipi_dsi_device *dsi)
>   {
>   	struct boe_bf060y8m_aj0 *boe = 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(&boe->panel);
>   }
>   
> diff --git a/drivers/gpu/drm/panel/panel-boe-himax8279d.c b/drivers/gpu/drm/panel/panel-boe-himax8279d.c
> index 4a8560b4b899..ffcb63f65b75 100644
> --- a/drivers/gpu/drm/panel/panel-boe-himax8279d.c
> +++ b/drivers/gpu/drm/panel/panel-boe-himax8279d.c
> @@ -881,7 +881,7 @@ static int panel_probe(struct mipi_dsi_device *dsi)
>   	if (err < 0)
>   		return err;
>   
> -	err = mipi_dsi_attach(dsi);
> +	err = devm_mipi_dsi_attach(&dsi->dev, dsi);
>   	if (err < 0)
>   		drm_panel_remove(&pinfo->base);
>   
> @@ -891,12 +891,6 @@ static int panel_probe(struct mipi_dsi_device *dsi)
>   static void panel_remove(struct mipi_dsi_device *dsi)
>   {
>   	struct panel_info *pinfo = mipi_dsi_get_drvdata(dsi);
> -	int err;
> -
> -	err = mipi_dsi_detach(dsi);
> -	if (err < 0)
> -		dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", err);
> -
>   	drm_panel_remove(&pinfo->base);
>   }
>   
> diff --git a/drivers/gpu/drm/panel/panel-boe-td4320.c b/drivers/gpu/drm/panel/panel-boe-td4320.c
> index 23558a76dd72..704d5a9c13e7 100644
> --- a/drivers/gpu/drm/panel/panel-boe-td4320.c
> +++ b/drivers/gpu/drm/panel/panel-boe-td4320.c
> @@ -204,7 +204,7 @@ static int boe_td4320_probe(struct mipi_dsi_device *dsi)
>   
>   	drm_panel_add(&ctx->panel);
>   
> -	ret = mipi_dsi_attach(dsi);
> +	ret = devm_mipi_dsi_attach(&dsi->dev, dsi);
>   	if (ret < 0) {
>   		drm_panel_remove(&ctx->panel);
>   		return dev_err_probe(dev, ret, "Failed to attach to DSI host\n");
> @@ -216,12 +216,6 @@ static int boe_td4320_probe(struct mipi_dsi_device *dsi)
>   static void boe_td4320_remove(struct mipi_dsi_device *dsi)
>   {
>   	struct boe_td4320 *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);
>   }
>   
> diff --git a/drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c b/drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c
> index a70a2e58f88c..94cc675973e6 100644
> --- a/drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c
> +++ b/drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c
> @@ -393,7 +393,7 @@ static int boe_th101mb31ig002_dsi_probe(struct mipi_dsi_device *dsi)
>   
>   	drm_panel_add(&ctx->panel);
>   
> -	ret = mipi_dsi_attach(dsi);
> +	ret = devm_mipi_dsi_attach(&dsi->dev, dsi);
>   	if (ret < 0) {
>   		dev_err_probe(&dsi->dev, ret,
>   			      "Failed to attach panel to DSI host\n");
> @@ -407,8 +407,6 @@ static int boe_th101mb31ig002_dsi_probe(struct mipi_dsi_device *dsi)
>   static void boe_th101mb31ig002_dsi_remove(struct mipi_dsi_device *dsi)
>   {
>   	struct boe_th101mb31ig002 *ctx = mipi_dsi_get_drvdata(dsi);
> -
> -	mipi_dsi_detach(dsi);
>   	drm_panel_remove(&ctx->panel);
>   }
>   
> diff --git a/drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c b/drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c
> index 20b6e11a7d84..2ab7764d4094 100644
> --- a/drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c
> +++ b/drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c
> @@ -200,7 +200,7 @@ static int boe_tv101wum_ll2_probe(struct mipi_dsi_device *dsi)
>   
>   	drm_panel_add(&ctx->panel);
>   
> -	ret = mipi_dsi_attach(dsi);
> +	ret = devm_mipi_dsi_attach(&dsi->dev, dsi);
>   	if (ret < 0) {
>   		drm_panel_remove(&ctx->panel);
>   		return dev_err_probe(dev, ret, "Failed to attach to DSI host\n");
> @@ -212,12 +212,6 @@ static int boe_tv101wum_ll2_probe(struct mipi_dsi_device *dsi)
>   static void boe_tv101wum_ll2_remove(struct mipi_dsi_device *dsi)
>   {
>   	struct boe_tv101wum_ll2 *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);
>   }
>   
> diff --git a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
> index 150dff3ab6c3..7d2672578dd8 100644
> --- a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
> +++ b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
> @@ -1765,7 +1765,7 @@ static int boe_panel_probe(struct mipi_dsi_device *dsi)
>   
>   	mipi_dsi_set_drvdata(dsi, boe);
>   
> -	ret = mipi_dsi_attach(dsi);
> +	ret = devm_mipi_dsi_attach(&dsi->dev, dsi);
>   	if (ret)
>   		drm_panel_remove(&boe->base);
>   
> @@ -1775,11 +1775,6 @@ static int boe_panel_probe(struct mipi_dsi_device *dsi)
>   static void boe_panel_remove(struct mipi_dsi_device *dsi)
>   {
>   	struct boe_panel *boe = 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);
>   
>   	if (boe->base.dev)
>   		drm_panel_remove(&boe->base);

Otherwise looks good.

Thanks,
Neil

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

* Re: [PATCH v2 1/6] drm/panel: Use devm_mipi_dsi_attach in BOE panels
  2026-08-12 11:50 ` Neil Armstrong
@ 2026-08-12 13:06   ` Osama Abdelkader
  0 siblings, 0 replies; 3+ messages in thread
From: Osama Abdelkader @ 2026-08-12 13:06 UTC (permalink / raw)
  To: Neil Armstrong
  Cc: luca.ceresoli, Jessica Zhang, Maarten Lankhorst, Maxime Ripard,
	Thomas Zimmermann, David Airlie, Simona Vetter, Jerry Han,
	dri-devel, linux-kernel

On Wed, Aug 12, 2026 at 01:50:31PM +0200, Neil Armstrong wrote:
> Hi,
> 
> On 8/11/26 18:50, Osama Abdelkader wrote:
> > Use the managed MIPI DSI attach helper in BOE panel drivers and drop the
> > corresponding manual detach calls from remove paths.
> > 
> > Signed-off-by: Osama Abdelkader <osama.abdelkader@gmail.com>
> > 
> > v2:
> > - break long description lines.
> > - add Signed-off-by tag
> 
> Please move the changelog after the ---, or use a tool like b4 to handle that
> automatically.
> 
> > ---
> >   drivers/gpu/drm/panel/panel-boe-bf060y8m-aj0.c       | 8 +-------
> >   drivers/gpu/drm/panel/panel-boe-himax8279d.c         | 8 +-------
> >   drivers/gpu/drm/panel/panel-boe-td4320.c             | 8 +-------
> >   drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c | 4 +---
> >   drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c       | 8 +-------
> >   drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c       | 7 +------
> >   6 files changed, 6 insertions(+), 37 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/panel/panel-boe-bf060y8m-aj0.c b/drivers/gpu/drm/panel/panel-boe-bf060y8m-aj0.c
> > index 84c21c62a43e..6a74523a6614 100644
> > --- a/drivers/gpu/drm/panel/panel-boe-bf060y8m-aj0.c
> > +++ b/drivers/gpu/drm/panel/panel-boe-bf060y8m-aj0.c
> > @@ -359,7 +359,7 @@ static int boe_bf060y8m_aj0_probe(struct mipi_dsi_device *dsi)
> >   	drm_panel_add(&boe->panel);
> > -	ret = mipi_dsi_attach(dsi);
> > +	ret = devm_mipi_dsi_attach(&dsi->dev, dsi);
> >   	if (ret < 0) {
> >   		dev_err(dev, "Failed to attach to DSI host: %d\n", ret);
> >   		return ret;
> > @@ -371,12 +371,6 @@ static int boe_bf060y8m_aj0_probe(struct mipi_dsi_device *dsi)
> >   static void boe_bf060y8m_aj0_remove(struct mipi_dsi_device *dsi)
> >   {
> >   	struct boe_bf060y8m_aj0 *boe = 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(&boe->panel);
> >   }
> > diff --git a/drivers/gpu/drm/panel/panel-boe-himax8279d.c b/drivers/gpu/drm/panel/panel-boe-himax8279d.c
> > index 4a8560b4b899..ffcb63f65b75 100644
> > --- a/drivers/gpu/drm/panel/panel-boe-himax8279d.c
> > +++ b/drivers/gpu/drm/panel/panel-boe-himax8279d.c
> > @@ -881,7 +881,7 @@ static int panel_probe(struct mipi_dsi_device *dsi)
> >   	if (err < 0)
> >   		return err;
> > -	err = mipi_dsi_attach(dsi);
> > +	err = devm_mipi_dsi_attach(&dsi->dev, dsi);
> >   	if (err < 0)
> >   		drm_panel_remove(&pinfo->base);
> > @@ -891,12 +891,6 @@ static int panel_probe(struct mipi_dsi_device *dsi)
> >   static void panel_remove(struct mipi_dsi_device *dsi)
> >   {
> >   	struct panel_info *pinfo = mipi_dsi_get_drvdata(dsi);
> > -	int err;
> > -
> > -	err = mipi_dsi_detach(dsi);
> > -	if (err < 0)
> > -		dev_err(&dsi->dev, "failed to detach from DSI host: %d\n", err);
> > -
> >   	drm_panel_remove(&pinfo->base);
> >   }
> > diff --git a/drivers/gpu/drm/panel/panel-boe-td4320.c b/drivers/gpu/drm/panel/panel-boe-td4320.c
> > index 23558a76dd72..704d5a9c13e7 100644
> > --- a/drivers/gpu/drm/panel/panel-boe-td4320.c
> > +++ b/drivers/gpu/drm/panel/panel-boe-td4320.c
> > @@ -204,7 +204,7 @@ static int boe_td4320_probe(struct mipi_dsi_device *dsi)
> >   	drm_panel_add(&ctx->panel);
> > -	ret = mipi_dsi_attach(dsi);
> > +	ret = devm_mipi_dsi_attach(&dsi->dev, dsi);
> >   	if (ret < 0) {
> >   		drm_panel_remove(&ctx->panel);
> >   		return dev_err_probe(dev, ret, "Failed to attach to DSI host\n");
> > @@ -216,12 +216,6 @@ static int boe_td4320_probe(struct mipi_dsi_device *dsi)
> >   static void boe_td4320_remove(struct mipi_dsi_device *dsi)
> >   {
> >   	struct boe_td4320 *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);
> >   }
> > diff --git a/drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c b/drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c
> > index a70a2e58f88c..94cc675973e6 100644
> > --- a/drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c
> > +++ b/drivers/gpu/drm/panel/panel-boe-th101mb31ig002-28a.c
> > @@ -393,7 +393,7 @@ static int boe_th101mb31ig002_dsi_probe(struct mipi_dsi_device *dsi)
> >   	drm_panel_add(&ctx->panel);
> > -	ret = mipi_dsi_attach(dsi);
> > +	ret = devm_mipi_dsi_attach(&dsi->dev, dsi);
> >   	if (ret < 0) {
> >   		dev_err_probe(&dsi->dev, ret,
> >   			      "Failed to attach panel to DSI host\n");
> > @@ -407,8 +407,6 @@ static int boe_th101mb31ig002_dsi_probe(struct mipi_dsi_device *dsi)
> >   static void boe_th101mb31ig002_dsi_remove(struct mipi_dsi_device *dsi)
> >   {
> >   	struct boe_th101mb31ig002 *ctx = mipi_dsi_get_drvdata(dsi);
> > -
> > -	mipi_dsi_detach(dsi);
> >   	drm_panel_remove(&ctx->panel);
> >   }
> > diff --git a/drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c b/drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c
> > index 20b6e11a7d84..2ab7764d4094 100644
> > --- a/drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c
> > +++ b/drivers/gpu/drm/panel/panel-boe-tv101wum-ll2.c
> > @@ -200,7 +200,7 @@ static int boe_tv101wum_ll2_probe(struct mipi_dsi_device *dsi)
> >   	drm_panel_add(&ctx->panel);
> > -	ret = mipi_dsi_attach(dsi);
> > +	ret = devm_mipi_dsi_attach(&dsi->dev, dsi);
> >   	if (ret < 0) {
> >   		drm_panel_remove(&ctx->panel);
> >   		return dev_err_probe(dev, ret, "Failed to attach to DSI host\n");
> > @@ -212,12 +212,6 @@ static int boe_tv101wum_ll2_probe(struct mipi_dsi_device *dsi)
> >   static void boe_tv101wum_ll2_remove(struct mipi_dsi_device *dsi)
> >   {
> >   	struct boe_tv101wum_ll2 *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);
> >   }
> > diff --git a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
> > index 150dff3ab6c3..7d2672578dd8 100644
> > --- a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
> > +++ b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
> > @@ -1765,7 +1765,7 @@ static int boe_panel_probe(struct mipi_dsi_device *dsi)
> >   	mipi_dsi_set_drvdata(dsi, boe);
> > -	ret = mipi_dsi_attach(dsi);
> > +	ret = devm_mipi_dsi_attach(&dsi->dev, dsi);
> >   	if (ret)
> >   		drm_panel_remove(&boe->base);
> > @@ -1775,11 +1775,6 @@ static int boe_panel_probe(struct mipi_dsi_device *dsi)
> >   static void boe_panel_remove(struct mipi_dsi_device *dsi)
> >   {
> >   	struct boe_panel *boe = 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);
> >   	if (boe->base.dev)
> >   		drm_panel_remove(&boe->base);
> 
> Otherwise looks good.
> 
> Thanks,
> Neil

Hi Neil,

Thanks for the review, I just sent v3 for that.

Thanks,
Osama

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

end of thread, other threads:[~2026-08-12 13:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-11 16:50 [PATCH v2 1/6] drm/panel: Use devm_mipi_dsi_attach in BOE panels Osama Abdelkader
2026-08-12 11:50 ` Neil Armstrong
2026-08-12 13:06   ` Osama Abdelkader

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