From d91eb712fe4b75ae6768a3f9d0771b21fbbaa3ca Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Fri, 14 Mar 2025 12:03:09 +0900 Subject: [PATCH] drm/panel: st7701: Add prepare_prev_first flag to drm_panel BugLink: https://bugs.launchpad.net/bugs/2102266 [ Upstream commit 406dd4c7984a457567ca652455d5efad81983f02 ] The DSI host must be enabled for the panel to be initialized in prepare(). Set the prepare_prev_first flag to guarantee this. This fixes the panel operation on NXP i.MX8MP SoC / Samsung DSIM DSI host. Fixes: 849b2e3ff969 ("drm/panel: Add Sitronix ST7701 panel driver") Signed-off-by: Marek Vasut Reviewed-by: Jessica Zhang Link: https://lore.kernel.org/r/20241124224812.150263-1-marex@denx.de Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20241124224812.150263-1-marex@denx.de Signed-off-by: Sasha Levin [koichiroden: due to the absense of commit: a055c91ac6ea ("drm/panel: st7701: Decouple DSI and DRM parts"), the line addition was applied to st7701_dsi_probe() instead of st7701_probe()] Signed-off-by: Koichiro Den Signed-off-by: Mehmet Basaran --- drivers/gpu/drm/panel/panel-sitronix-st7701.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7701.c b/drivers/gpu/drm/panel/panel-sitronix-st7701.c index 421eb4592b61..8c1be2f29d08 100644 --- a/drivers/gpu/drm/panel/panel-sitronix-st7701.c +++ b/drivers/gpu/drm/panel/panel-sitronix-st7701.c @@ -1010,6 +1010,7 @@ static int st7701_dsi_probe(struct mipi_dsi_device *dsi) drm_panel_init(&st7701->panel, &dsi->dev, &st7701_funcs, DRM_MODE_CONNECTOR_DSI); + st7701->panel.prepare_prev_first = true; /** * Once sleep out has been issued, ST7701 IC required to wait 120ms