hwc: unblank display on doze mode
authorSimon Shields <simon@lineageos.org>
Mon, 12 Feb 2018 06:44:57 +0000 (17:44 +1100)
committerJan Altensen <info@stricted.net>
Sun, 5 Apr 2020 10:22:40 +0000 (12:22 +0200)
this appears to be the behaviour expected by the kernel.

Change-Id: I0a9d69f979707f982d31b8ee49a62f05b27b8933

libhwc/ExynosHWC.cpp

index 338ab8d05a8044ec5ffffc99be80879ccf0e5eac..4bda3887796e37f092fc6d7902289bb60240c7f4 100644 (file)
@@ -1071,15 +1071,15 @@ int exynos_setPowerMode(struct hwc_composer_device_1* dev, int disp, int mode)
     case HWC_DISPLAY_PRIMARY: {
 #ifdef USES_VPP
         if ((mode == HWC_POWER_MODE_DOZE) || (mode == HWC_POWER_MODE_DOZE_SUSPEND)) {
-            if (pdev->primaryDisplay->mBlanked == 0) {
-                fb_blank = FB_BLANK_POWERDOWN;
+            if (pdev->primaryDisplay->mBlanked == 1) {
+                fb_blank = FB_BLANK_UNBLANK;
                 int err = ioctl(pdev->primaryDisplay->mDisplayFd, FBIOBLANK, fb_blank);
                 if (err < 0) {
                     ALOGE("blank ioctl failed: %s, mode(%d)", strerror(errno), mode);
                     return -errno;
                 }
             }
-            pdev->primaryDisplay->mBlanked = 1;
+            pdev->primaryDisplay->mBlanked = 0;
             return pdev->primaryDisplay->setPowerMode(mode);
         }
 #endif