There is an issue with surfaceflinger at startup whereby it needs at
least 2 vsync events in order to compute the vsync period. If these
events do not come after 1s timeout, it'll fake a vsync event, leading
to a crash (mod-by-0 exception due to vsync period being 0).
void DrmDisplay::enableVsync() {
mVsyncEnabled = true;
- if (mModeSet) {
- mVsyncThread.enable();
- }
+ mVsyncThread.enable();
}
void DrmDisplay::disableVsync() {
<< " for display " << *this;
} else {
mModeSet = true;
- if (mVsyncEnabled)
- mVsyncThread.enable();
}
}
}