Skip to content

Commit 61bea6a

Browse files
hsinyi527gregkh
authored andcommitted
drm/panel: panel-innolux: set display off in innolux_panel_unprepare
[ Upstream commit 46f3cea ] Move mipi_dsi_dcs_set_display_off() from innolux_panel_disable() to innolux_panel_unprepare(), so they are consistent with innolux_panel_enable() and innolux_panel_prepare(). This also fixes some mode check and irq timeout issue in MTK dsi code. Since some dsi code (e.g. mtk_dsi) have following call trace: 1. drm_panel_disable(), which calls innolux_panel_disable() 2. switch to cmd mode 3. drm_panel_unprepare(), which calls innolux_panel_unprepare() However, mtk_dsi needs to be in cmd mode to be able to send commands (e.g. mipi_dsi_dcs_set_display_off() and mipi_dsi_dcs_enter_sleep_mode()), so we need these functions to be called after the switch to cmd mode happens, i.e. in innolux_panel_unprepare. Signed-off-by: Hsin-Yi, Wang <[email protected]> Signed-off-by: Sean Paul <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] Signed-off-by: Sasha Levin <[email protected]>
1 parent f2778b3 commit 61bea6a

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

drivers/gpu/drm/panel/panel-innolux-p079zca.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,13 @@ static inline struct innolux_panel *to_innolux_panel(struct drm_panel *panel)
4040
static int innolux_panel_disable(struct drm_panel *panel)
4141
{
4242
struct innolux_panel *innolux = to_innolux_panel(panel);
43-
int err;
4443

4544
if (!innolux->enabled)
4645
return 0;
4746

4847
innolux->backlight->props.power = FB_BLANK_POWERDOWN;
4948
backlight_update_status(innolux->backlight);
5049

51-
err = mipi_dsi_dcs_set_display_off(innolux->link);
52-
if (err < 0)
53-
DRM_DEV_ERROR(panel->dev, "failed to set display off: %d\n",
54-
err);
55-
5650
innolux->enabled = false;
5751

5852
return 0;
@@ -66,6 +60,11 @@ static int innolux_panel_unprepare(struct drm_panel *panel)
6660
if (!innolux->prepared)
6761
return 0;
6862

63+
err = mipi_dsi_dcs_set_display_off(innolux->link);
64+
if (err < 0)
65+
DRM_DEV_ERROR(panel->dev, "failed to set display off: %d\n",
66+
err);
67+
6968
err = mipi_dsi_dcs_enter_sleep_mode(innolux->link);
7069
if (err < 0) {
7170
DRM_DEV_ERROR(panel->dev, "failed to enter sleep mode: %d\n",

0 commit comments

Comments
 (0)