hwc: Unblank primary display on bootup.
SurfaceFlinger assumes that the primary is unblanked on bootup.
Change-Id: I481ece9772ad29ac5eddd2b31f67f3f68bb3baa5
diff --git a/libhwcomposer/hwc_utils.cpp b/libhwcomposer/hwc_utils.cpp
index ef7fa75..4cfcc63 100644
--- a/libhwcomposer/hwc_utils.cpp
+++ b/libhwcomposer/hwc_utils.cpp
@@ -109,6 +109,13 @@
ctx->dpyAttr[HWC_DISPLAY_PRIMARY].ydpi = ydpi;
ctx->dpyAttr[HWC_DISPLAY_PRIMARY].vsync_period = 1000000000l / fps;
+ //Unblank primary on first boot
+ if(ioctl(fb_fd, FBIOBLANK,FB_BLANK_UNBLANK) < 0) {
+ ALOGE("%s: Failed to unblank display", __FUNCTION__);
+ return -errno;
+ }
+ ctx->dpyAttr[HWC_DISPLAY_PRIMARY].isActive = true;
+
return 0;
}