hwc: 8992/8994: Disable BWC when HDMI is connected

8994/8992 don't support BWC with video mode panels in system.
Disable BWC when HDMI is connected.

Change-Id: I43616cc90bb2a518bae360af996889a75cc8c633
diff --git a/libhwcomposer/hwc_uevents.cpp b/libhwcomposer/hwc_uevents.cpp
index d1c68a5..d53fd8f 100644
--- a/libhwcomposer/hwc_uevents.cpp
+++ b/libhwcomposer/hwc_uevents.cpp
@@ -125,6 +125,16 @@
                         "event", __FUNCTION__);
                 ctx->proc->hotplug(ctx->proc, dpy, EXTERNAL_OFFLINE);
             }
+
+            //On 8994, 8992 due to hardware limitations, we disable bwc
+            //when HDMI intf is active
+            if((qdutils::MDPVersion::getInstance().is8994() or
+                qdutils::MDPVersion::getInstance().is8092()) and
+                    qdutils::MDPVersion::getInstance().supportsBWC()) {
+                Locker::Autolock _l(ctx->mDrawLock);
+                ctx->mBWCEnabled = true;
+            }
+
             break;
         }
     case EXTERNAL_ONLINE:
@@ -136,6 +146,15 @@
                 break;
             }
 
+            //On 8994, 8992 due to hardware limitations, we disable bwc
+            //when HDMI intf is active
+            if((qdutils::MDPVersion::getInstance().is8994() or
+                qdutils::MDPVersion::getInstance().is8092()) and
+                    qdutils::MDPVersion::getInstance().supportsBWC()) {
+                Locker::Autolock _l(ctx->mDrawLock);
+                ctx->mBWCEnabled = false;
+            }
+
             if (ctx->mHDMIDisplay->isHDMIPrimaryDisplay()) {
                 ctx->mDrawLock.lock();
                 handle_online(ctx, dpy);