On Mon Sep 21, 2026 at 3:17 PM CEST, Osama Abdelkader wrote:
> Use the managed MIPI DSI attach and panel add helpers in assorted
> panel drivers and drop the corresponding manual detach and panel remove
> calls from remove paths.
>
> Suggested-by: Luca Ceresoli <[email protected]>
> Signed-off-by: Osama Abdelkader <[email protected]>
...
> --- a/drivers/gpu/drm/panel/panel-ebbg-ft8719.c
> +++ b/drivers/gpu/drm/panel/panel-ebbg-ft8719.c
> @@ -202,30 +202,19 @@ static int ebbg_ft8719_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 ret;
>
> - 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);
> - drm_panel_remove(&ctx->panel);
> return ret;
> }
As for patch 2, this could be even simpler by using dev_err_probe(). Same
for other drivers in this patch.
> --- a/drivers/gpu/drm/panel/panel-sitronix-st7701.c
> +++ b/drivers/gpu/drm/panel/panel-sitronix-st7701.c
> @@ -1263,7 +1263,6 @@ static void st7701_cleanup(void *data)
> {
> struct st7701 *st7701 = (struct st7701 *)data;
>
> - drm_panel_remove(&st7701->panel);
> drm_panel_disable(&st7701->panel);
> drm_panel_unprepare(&st7701->panel);
> }
The last two calls here appear inappropriate IMO. However it's not an issue
with your patch.
Reviewed-by: Luca Ceresoli <[email protected]>
Luca
--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com