hwc: Reset isConfiguring flag on external disconnect
If external/virtual is connected and disconnected before any composition
cycle has triggered, isConfiguring flag may remain true. This will cause
fallback to gpu even for primary.
Change-Id: I57279d43d4bacffe3bebe0549f6c3735b36ead30
diff --git a/libhwcomposer/hwc_uevents.cpp b/libhwcomposer/hwc_uevents.cpp
index 7061991..c535c5e 100644
--- a/libhwcomposer/hwc_uevents.cpp
+++ b/libhwcomposer/hwc_uevents.cpp
@@ -129,6 +129,8 @@
clear(ctx, dpy);
ctx->dpyAttr[dpy].connected = false;
ctx->dpyAttr[dpy].isActive = false;
+ /* If disconnect comes before any composition cycle */
+ ctx->dpyAttr[dpy].isConfiguring = false;
ctx->mExtDisplay->teardown();