From ef6fec42a89ba0f538df40f90bd9d5368fda034e Mon Sep 17 00:00:00 2001 From: Aravind Venkateswaran Date: Fri, 17 Oct 2014 12:02:05 -0700 Subject: [PATCH] msm: mdss: unblank panel when entering doze mode for video mode panels For video mode panels, MDSS hardware needs to be on as long as the panel is on. When doze mode is requested for a video mode panel, no special optimizations can be done in the display driver to configure the hardware in a low power state. As such, when doze mode is requested for video mode panels, simply unblank the panel if it is not already on. Change-Id: I0f279d78b9b5c8eebb2bf654df628acafa408f23 Signed-off-by: Aravind Venkateswaran --- drivers/video/fbdev/msm/mdss_fb.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/video/fbdev/msm/mdss_fb.c b/drivers/video/fbdev/msm/mdss_fb.c index 9d5f62672d02..5d866351aee0 100644 --- a/drivers/video/fbdev/msm/mdss_fb.c +++ b/drivers/video/fbdev/msm/mdss_fb.c @@ -1202,6 +1202,22 @@ static int mdss_fb_blank_sub(int blank_mode, struct fb_info *info, blank_mode); cur_power_state = mfd->panel_power_state; + + /* + * If doze mode is requested for video mode panels, treat + * the request as full unblank as there are no low power mode + * settings for video mode panels. + */ + if ((FB_BLANK_VSYNC_SUSPEND == blank_mode) && + (mfd->panel_info->type != MIPI_CMD_PANEL)) { + pr_debug("Doze mode only valid for cmd mode panels\n"); + + if (mdss_panel_is_power_on(cur_power_state)) + return 0; + else + blank_mode = FB_BLANK_UNBLANK; + } + switch (blank_mode) { case FB_BLANK_UNBLANK: pr_debug("unblank called. cur pwr state=%d\n", cur_power_state);