summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNaseer Ahmed <naseer@codeaurora.org>2014-10-28 20:20:04 -0400
committerArne Coucheron <arco68@gmail.com>2020-01-13 17:31:10 +0100
commit36a80a4eaeec5e5527d2d505f8adcc6922d2435d (patch)
tree7b11e85ad5053352d14fd1f6d7c6f15a19f9dc6a
parent8b5b438e398c030ec99fea19ab02f8c223b60e6a (diff)
downloadhardware_qcom_display-36a80a4eaeec5e5527d2d505f8adcc6922d2435d.tar.gz
hardware_qcom_display-36a80a4eaeec5e5527d2d505f8adcc6922d2435d.tar.bz2
hardware_qcom_display-36a80a4eaeec5e5527d2d505f8adcc6922d2435d.zip
hwc: Handle DOZE_SUSPEND properly
DOZE_SUSPEND is the lowest power state with the display still on. With DOZE, we can still have updates. With DOZE_SUSPEND, MDP clocks are off and no update can happen. This is applicable only for wearables and doesn't happen in doze in handhelds/tablets. Change-Id: I10fe467a099ead3b0b56a01fec0fb18e1ad78580
-rw-r--r--libhwcomposer/hwc.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/libhwcomposer/hwc.cpp b/libhwcomposer/hwc.cpp
index 9f06a51e1..6d30a3a02 100644
--- a/libhwcomposer/hwc.cpp
+++ b/libhwcomposer/hwc.cpp
@@ -378,7 +378,13 @@ static int hwc_setPowerMode(struct hwc_composer_device_1* dev, int dpy,
value = FB_BLANK_POWERDOWN;
break;
case HWC_POWER_MODE_DOZE:
+ // FB_BLANK_NORMAL is being used here to map to doze mode
+ // This definition is specific to our fbdev implementation
+ value = FB_BLANK_NORMAL;
+ break;
case HWC_POWER_MODE_DOZE_SUSPEND:
+ // FB_BLANK_VSYNC_SUSPEND is being used here to map to doze_suspend
+ // This definition is specific to our fbdev implementation
value = FB_BLANK_VSYNC_SUSPEND;
break;
case HWC_POWER_MODE_NORMAL:
@@ -407,7 +413,8 @@ static int hwc_setPowerMode(struct hwc_composer_device_1* dev, int dpy,
ctx->mExtDisplay->setHPD(1);
}
- ctx->dpyAttr[dpy].isActive = not(mode == HWC_POWER_MODE_OFF);
+ ctx->dpyAttr[dpy].isActive = not(mode == HWC_POWER_MODE_OFF ||
+ mode == HWC_POWER_MODE_DOZE_SUSPEND);
if(ctx->mVirtualonExtActive) {
/* if mVirtualonExtActive is true, display hal will