diff --git a/services/surfaceflinger/SurfaceFlinger_hwc1.cpp b/services/surfaceflinger/SurfaceFlinger_hwc1.cpp index ed144c1bd7b5c15b3a559b98a7e382c725b66d4c..29e85d352193ac4bcbed28824bb548752ce3ae7f 100644 --- a/services/surfaceflinger/SurfaceFlinger_hwc1.cpp +++ b/services/surfaceflinger/SurfaceFlinger_hwc1.cpp @@ -96,6 +96,9 @@ #define DISPLAY_COUNT 1 +#define FBIOBLANK 0x4611 +#define FB_BLANK_UNBLANK 0 + /* * DEBUG_SCREENSHOTS: set to true to check that screenshots are not all * black pixels. @@ -2701,6 +2704,16 @@ void SurfaceFlinger::setPowerModeInternal(const sp& hw, int mode) { ALOGD("Set power mode=%d, type=%d flinger=%p", mode, hw->getDisplayType(), this); + + if (mode == 2) //Awaking the lcd + { + int fd, ret; + fd = open("/dev/graphics/fb0",O_WRONLY); + ret = ioctl(fd, FBIOBLANK, FB_BLANK_UNBLANK); + + if (ret < 0) + ALOGE("Error waking up LCD: %d (%s)\n", ret, strerror(errno)); + } int32_t type = hw->getDisplayType(); int currentMode = hw->getPowerMode();