hwc: Add some debug and warning logs.
Add debug logs for blank, unblank and warning logs for composition on powerdown.
Change-Id: I184a9503a26d401cf70e072815603a47d3972eed
diff --git a/libhwcomposer/hwc.cpp b/libhwcomposer/hwc.cpp
index 02b19b8..15b712c 100644
--- a/libhwcomposer/hwc.cpp
+++ b/libhwcomposer/hwc.cpp
@@ -81,6 +81,10 @@
hwc_context_t* ctx = (hwc_context_t*)(dev);
ctx->overlayInUse = false;
+ if(ctx->isPoweredDown) {
+ ALOGW("SurfaceFlinger called %s after a POWERDOWN", __FUNCTION__);
+ }
+
for (uint32_t i = 0; i <numDisplays; i++) {
hwc_display_contents_1_t* list = displays[i];
ctx->dpys[i] = list->dpy;
@@ -145,9 +149,13 @@
if(blank) {
ctx->mOverlay->setState(ovutils::OV_CLOSED);
ctx->qbuf->unlockAllPrevious();
+ ALOGD("HWC Calling POWERDOWN ...");
ioctl(m->framebuffer->fd, FBIOBLANK, FB_BLANK_POWERDOWN);
+ ctx->isPoweredDown = true;
} else {
+ ALOGD("HWC Calling UNBLANK ...");
ioctl(m->framebuffer->fd, FBIOBLANK, FB_BLANK_UNBLANK);
+ ctx->isPoweredDown = false;
}
return 0;
}
diff --git a/libhwcomposer/hwc_utils.h b/libhwcomposer/hwc_utils.h
index 04bf864..9cb6e15 100644
--- a/libhwcomposer/hwc_utils.h
+++ b/libhwcomposer/hwc_utils.h
@@ -156,6 +156,7 @@
qhwc::MDPInfo mMDP;
+ bool isPoweredDown;
};
#endif //HWC_UTILS_H