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
diff --git a/libhwcomposer/hwc.cpp b/libhwcomposer/hwc.cpp
index 928f3b8..05e7c9b 100644
--- a/libhwcomposer/hwc.cpp
+++ b/libhwcomposer/hwc.cpp
@@ -449,7 +449,13 @@
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:
@@ -485,7 +491,8 @@
ctx->mHPDEnabled = true;
}
- 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);
}
//Deliberate fall through since there is no explicit power mode for
//virtual displays.