libhwc2.1: restrict the external display to a single DPP configuration

There is flickring issue when the external display has mixed composition
type. To avoid it, HWC restricts the external display to a single DDP
configuration to have the same composition type.

Bug: 311578920
Test: check the mini player case
Change-Id: If0b0d834b0a3568df50dbebf1762fdb2103f773c
diff --git a/libhwc2.1/libresource/ExynosResourceManagerModule.cpp b/libhwc2.1/libresource/ExynosResourceManagerModule.cpp
index 255ea66..0428350 100644
--- a/libhwc2.1/libresource/ExynosResourceManagerModule.cpp
+++ b/libhwc2.1/libresource/ExynosResourceManagerModule.cpp
@@ -577,3 +577,15 @@
 
     return 0;
 }
+
+bool ExynosResourceManagerModule::isAssignable(ExynosMPP* candidateMPP, ExynosDisplay* display,
+                                               struct exynos_image& src, struct exynos_image& dst,
+                                               ExynosMPPSource* mppSrc) {
+    if (display != nullptr && candidateMPP != nullptr &&
+        display->mType == HWC_DISPLAY_EXTERNAL &&
+        !(candidateMPP->mPhysicalType == MPP_DPP_VGRFS && candidateMPP->mPhysicalIndex == 0)) {
+        return false;
+    }
+    return gs201::ExynosResourceManagerModule::isAssignable(candidateMPP, display, src, dst,
+                                                            mppSrc);
+}
diff --git a/libhwc2.1/libresource/ExynosResourceManagerModule.h b/libhwc2.1/libresource/ExynosResourceManagerModule.h
index c4258c9..e9ab5ad 100644
--- a/libhwc2.1/libresource/ExynosResourceManagerModule.h
+++ b/libhwc2.1/libresource/ExynosResourceManagerModule.h
@@ -48,6 +48,9 @@
                              const DPUblockId_t& blkId, const AXIPortId_t& axiId,
                              ExynosDisplay* mainDisp, ExynosDisplay* minorDisp,
                              const ConstraintRev_t& constraintsRev);
+        virtual bool isAssignable(ExynosMPP* candidateMPP, ExynosDisplay* display,
+                                  struct exynos_image& src, struct exynos_image& dst,
+                                  ExynosMPPSource* mppSrc);
 
     private:
         ConstraintRev_t mConstraintRev;