hwc: Reset mode tracking in MDPComp constructor
Short story: This missing initialization fixes a crash in SF during
bootup on video mode panels with idle timeout.
Long story: SF creates HWC which registers a timeout handler. The
driver triggers this without even a composition round happening.
The junk value in mode tracking in MDPComp allows this timeout to
get translated into an invalidate() on SF. At this point SF may
not have fully created its EventThread (timing issue), which causes
a crash during bootup.
Change-Id: Icc91391399b2c0a027957be0689a226b5b1da783
diff --git a/libhwcomposer/hwc_mdpcomp.cpp b/libhwcomposer/hwc_mdpcomp.cpp
index 3743a8b..2fe80b4 100644
--- a/libhwcomposer/hwc_mdpcomp.cpp
+++ b/libhwcomposer/hwc_mdpcomp.cpp
@@ -68,7 +68,8 @@
return new MDPCompNonSplit(dpy);
}
-MDPComp::MDPComp(int dpy):mDpy(dpy){};
+MDPComp::MDPComp(int dpy) : mDpy(dpy), mModeOn(false), mPrevModeOn(false) {
+};
void MDPComp::dump(android::String8& buf, hwc_context_t *ctx)
{