[RFCv1,37/42] drm/omap: panel-dsi-cm: fix remove()
diff mbox series

Message ID 20191117024028.2233-38-sebastian.reichel@collabora.com
State New
Headers show
Series
  • drm/omap: Convert DSI code to use drm_mipi_dsi and drm_panel
Related show

Commit Message

Sebastian Reichel Nov. 17, 2019, 2:40 a.m. UTC
The remove function should disable the panel by
calling the unprepare() function before the panel
is disconnected from MIPI bus instead of trying
to reset it.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
 drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Patch
diff mbox series

diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c
index f607b3dfa31f..90132d1d1f5d 100644
--- a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c
+++ b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c
@@ -604,6 +604,8 @@  static int dsicm_remove(struct mipi_dsi_device *dsi)
 
 	dev_dbg(&dsi->dev, "remove\n");
 
+	drm_panel_unprepare(&ddata->panel);
+
 	mipi_dsi_detach(dsi);
 
 	drm_panel_remove(&ddata->panel);
@@ -613,9 +615,6 @@  static int dsicm_remove(struct mipi_dsi_device *dsi)
 	if (ddata->extbldev)
 		put_device(&ddata->extbldev->dev);
 
-	/* reset, to be sure that the panel is in a valid state */
-	dsicm_hw_reset(ddata);
-
 	return 0;
 }