summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInki Dae <inki.dae@samsung.com>2014-10-24 08:43:14 (GMT)
committerChanho Park <chanho61.park@samsung.com>2014-11-18 03:01:06 (GMT)
commitc3d7b6a853ac4ce7b4322bae081dc0cade3256fc (patch)
tree2b1bab4866668cf95e77ab29f5c494f61de3e01b
parent1928bb002a2154a7b7a6a105ba1d65a36a7f0263 (diff)
downloadlinux-3.10-c3d7b6a853ac4ce7b4322bae081dc0cade3256fc.zip
linux-3.10-c3d7b6a853ac4ce7b4322bae081dc0cade3256fc.tar.gz
linux-3.10-c3d7b6a853ac4ce7b4322bae081dc0cade3256fc.tar.bz2
drm/panel: s6e63j0x03: correct lcd power status
This patch makes sure for panel driver to have correct power status. Change-Id: I33e6e64969ab6f2679f5f1f889ccfde27d81c901 Signed-off-by: Inki Dae <inki.dae@samsung.com>
-rw-r--r--drivers/gpu/drm/panel/panel-s6e63j0x03.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/gpu/drm/panel/panel-s6e63j0x03.c b/drivers/gpu/drm/panel/panel-s6e63j0x03.c
index d07eb0a..de7bdfa 100644
--- a/drivers/gpu/drm/panel/panel-s6e63j0x03.c
+++ b/drivers/gpu/drm/panel/panel-s6e63j0x03.c
@@ -478,10 +478,12 @@ static const struct backlight_ops s6e63j0x03_bl_ops = {
.update_status = s6e63j0x03_set_brightness,
};
+static int s6e63j0x03_enable(struct drm_panel *panel);
static int s6e63j0x03_disable(struct drm_panel *panel)
{
struct s6e63j0x03 *ctx = panel_to_s6e63j0x03(panel);
+ int ret;
s6e63j0x03_dcs_write_seq_static(ctx, MIPI_DCS_SET_DISPLAY_OFF);
s6e63j0x03_dcs_write_seq_static(ctx, MIPI_DCS_ENTER_SLEEP_MODE);
@@ -491,7 +493,13 @@ static int s6e63j0x03_disable(struct drm_panel *panel)
usleep_range(ctx->power_off_delay * 1000,
(ctx->power_off_delay + 1) * 1000);
- return s6e63j0x03_power_off(ctx);
+ ret = s6e63j0x03_power_off(ctx);
+ if (ret < 0)
+ return s6e63j0x03_enable(panel);
+
+ ctx->power = FB_BLANK_POWERDOWN;
+
+ return ret;
}
static int s6e63j0x03_enable(struct drm_panel *panel)
@@ -509,7 +517,9 @@ static int s6e63j0x03_enable(struct drm_panel *panel)
ret = ctx->error;
if (ret < 0)
- s6e63j0x03_disable(panel);
+ return s6e63j0x03_disable(panel);
+
+ ctx->power = FB_BLANK_UNBLANK;
return ret;
}