Re: [PATCH v3 1/6] drm/panel: Use devm_mipi_dsi_attach in BOE panels

From: Luca Ceresoli

Date: Tue Aug 25 2026 - 12:04:29 EST


On Wed Aug 12, 2026 at 3:04 PM CEST, 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@xxxxxxxxx>

Please, next time use proper tools to send your series ina single thread
with a cover letter. This v3 is made of 6 e-mails in 6 separate threads,
which is very annoying to handle.

>
> ---
> v3:
> - Move the changelog after the `---`.
>
> 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);

Why not converting drm_panel_add() to the devm variant too? Without it...

>
> - 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);
> }

...the remove sequence will be incorrect: removing the panel first (open
coded) and detaching the DSI device afterwards (devm, done after .remove
returns).

Same for the other files.

Note that patch 2 is correct in this respect.

Luca

--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com