summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/panel
diff options
context:
space:
mode:
authorOndrej Jirman <megous@megous.com>2020-07-01 19:29:25 +0300
committerSam Ravnborg <sam@ravnborg.org>2020-07-01 20:25:42 +0300
commit43fc6db016a01793a89904ec71793337961ae5b0 (patch)
tree5798c2a7f12c34b08d15031bf108dfd40ff7035f /drivers/gpu/drm/panel
parent67680f87823e225fe150a7da7b10fc04496c4d76 (diff)
downloadlinux-43fc6db016a01793a89904ec71793337961ae5b0.tar.xz
drm/panel: st7703: Enter sleep after display off
The datasheet suggests to issue sleep in after display off as a part of the panel's shutdown sequence. Signed-off-by: Ondrej Jirman <megous@megous.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Tested-by: Guido Günther <agx@sigxcpu.org> Reviewed-by: Guido Günther <agx@sigxcpu.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20200701162928.1638874-11-megous@megous.com
Diffstat (limited to 'drivers/gpu/drm/panel')
-rw-r--r--drivers/gpu/drm/panel/panel-sitronix-st7703.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7703.c b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
index dadb482b244d..7750179bca60 100644
--- a/drivers/gpu/drm/panel/panel-sitronix-st7703.c
+++ b/drivers/gpu/drm/panel/panel-sitronix-st7703.c
@@ -393,8 +393,19 @@ static int st7703_disable(struct drm_panel *panel)
{
struct st7703 *ctx = panel_to_st7703(panel);
struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev);
+ int ret;
+
+ ret = mipi_dsi_dcs_set_display_off(dsi);
+ if (ret < 0)
+ DRM_DEV_ERROR(ctx->dev,
+ "Failed to turn off the display: %d\n", ret);
- return mipi_dsi_dcs_set_display_off(dsi);
+ ret = mipi_dsi_dcs_enter_sleep_mode(dsi);
+ if (ret < 0)
+ DRM_DEV_ERROR(ctx->dev,
+ "Failed to enter sleep mode: %d\n", ret);
+
+ return 0;
}
static int st7703_unprepare(struct drm_panel *panel)