From 1a0fa7710541923f011b6087c9e55ca5dafbecff Mon Sep 17 00:00:00 2001 From: Simon Shields Date: Mon, 12 Feb 2018 17:44:57 +1100 Subject: [PATCH] hwc: unblank display on doze mode this appears to be the behaviour expected by the kernel. Change-Id: I0a9d69f979707f982d31b8ee49a62f05b27b8933 --- libhwc/ExynosHWC.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libhwc/ExynosHWC.cpp b/libhwc/ExynosHWC.cpp index 338ab8d..4bda388 100644 --- a/libhwc/ExynosHWC.cpp +++ b/libhwc/ExynosHWC.cpp @@ -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 -- 2.20.1