diff options
| author | Dhaval Patel <pdhaval@codeaurora.org> | 2015-12-17 14:25:17 -0800 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-23 21:14:23 -0700 |
| commit | 3c94a189b5c38cc9f3af80403c5ac5a7c4213ce3 (patch) | |
| tree | 83f42bd5e2b195431117b5a0317632de8c43b4fa | |
| parent | 0fa038e7a9ddc59da68b980087e186df50746c1e (diff) | |
msm: mdss: avoid panel status check when panel is off
Sending BTA or other panel check status commands to the
panel, when panel is off might lead to abnormal
behavior. Since client can poll for the panel status
anytime, add necessary checks to avoid sending commands
when panel is off.
Change-Id: I95acc3df464d0a4640b79963b5701fcde79646d5
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
| -rw-r--r-- | drivers/video/fbdev/msm/mdss_fb.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/video/fbdev/msm/mdss_fb.c b/drivers/video/fbdev/msm/mdss_fb.c index 07a9a07511ed..344d1e5d758a 100644 --- a/drivers/video/fbdev/msm/mdss_fb.c +++ b/drivers/video/fbdev/msm/mdss_fb.c @@ -561,10 +561,14 @@ static ssize_t mdss_fb_get_panel_status(struct device *dev, int ret; int panel_status; - panel_status = mdss_fb_send_panel_event(mfd, - MDSS_EVENT_DSI_PANEL_STATUS, NULL); - ret = scnprintf(buf, PAGE_SIZE, "panel_status=%s\n", - panel_status > 0 ? "alive" : "dead"); + if (mdss_panel_is_power_off(mfd->panel_power_state)) { + ret = scnprintf(buf, PAGE_SIZE, "panel_status=%s\n", "suspend"); + } else { + panel_status = mdss_fb_send_panel_event(mfd, + MDSS_EVENT_DSI_PANEL_STATUS, NULL); + ret = scnprintf(buf, PAGE_SIZE, "panel_status=%s\n", + panel_status > 0 ? "alive" : "dead"); + } return ret; } |
