Merge "hwc: Handle DOZE_SUSPEND properly"
diff --git a/libhwcomposer/hwc.cpp b/libhwcomposer/hwc.cpp
index b7a9a00..f3b34c3 100644
--- a/libhwcomposer/hwc.cpp
+++ b/libhwcomposer/hwc.cpp
@@ -469,7 +469,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:
@@ -505,7 +511,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.