summaryrefslogtreecommitdiff
path: root/libhwc2.1/libdisplayinterface/ExynosDisplayDrmInterface.cpp
diff options
context:
space:
mode:
authorYongWook Shin <yongwook.shin@samsung.com>2021-04-28 16:57:10 +0900
committerLong Ling <longling@google.com>2021-09-27 16:01:22 -0700
commiteb8d178e148d97690d9f0230ef46563d35386d51 (patch)
treee4ad8f773eca7a11599d9442e6c00049be12dccb /libhwc2.1/libdisplayinterface/ExynosDisplayDrmInterface.cpp
parentdb496a5e8e05743ff7bf7af95134755b3b29cc03 (diff)
libhwc2.1: Separate plane type to support new purpose plane
In case of GS101, the number of planes is same as the number of windows. But, new purpose planes are added for RCD (Round Corner Display) function from GS201 and it occurs some problems. This patch separates planes to normal planes which are used for window composition and special purpose planes. The number of windows will be calcurated from the number of normal planes. Bug: 186553202 Signed-off-by: YongWook Shin <yongwook.shin@samsung.com> Change-Id: I1a3048c86f2479da974c6be7f63ade1342751a09
Diffstat (limited to 'libhwc2.1/libdisplayinterface/ExynosDisplayDrmInterface.cpp')
-rw-r--r--libhwc2.1/libdisplayinterface/ExynosDisplayDrmInterface.cpp29
1 files changed, 19 insertions, 10 deletions
diff --git a/libhwc2.1/libdisplayinterface/ExynosDisplayDrmInterface.cpp b/libhwc2.1/libdisplayinterface/ExynosDisplayDrmInterface.cpp
index 7c7f9b0..bbf25a3 100644
--- a/libhwc2.1/libdisplayinterface/ExynosDisplayDrmInterface.cpp
+++ b/libhwc2.1/libdisplayinterface/ExynosDisplayDrmInterface.cpp
@@ -574,15 +574,29 @@ int32_t ExynosDisplayDrmInterface::initDrmDevice(DrmDevice *drmDevice)
__func__, mExynosDisplay->mType, mExynosDisplay->mIndex,
drmDisplayId, mDrmCrtc->id(), mDrmConnector->id());
+ /* Mapping ExynosMPP resource with DPP Planes */
+ uint32_t numWindow = 0;
for (uint32_t i = 0; i < mDrmDevice->planes().size(); i++) {
auto &plane = mDrmDevice->planes().at(i);
uint32_t plane_id = plane->id();
- ExynosMPP *exynosMPP =
- mExynosDisplay->mResourceManager->getOtfMPPWithChannel(i);
- if (exynosMPP == NULL)
- HWC_LOGE(mExynosDisplay, "getOtfMPPWithChannel fail, ch(%d)", plane_id);
- mExynosMPPsForPlane[plane_id] = exynosMPP;
+
+ if (!plane->zpos_property().is_immutable()) {
+ /* Plane can be used for composition */
+ ExynosMPP *exynosMPP =
+ mExynosDisplay->mResourceManager->getOtfMPPWithChannel(i);
+ if (exynosMPP == NULL)
+ HWC_LOGE(mExynosDisplay, "getOtfMPPWithChannel fail, ch(%d)", plane_id);
+ mExynosMPPsForPlane[plane_id] = exynosMPP;
+ numWindow++;
+ } else {
+ /*
+ * Plane is special purpose plane which cannot be used for compositon.
+ * It's zpos property is immutable.
+ */
+ mExynosMPPsForPlane[plane_id] = NULL;
+ }
}
+ setMaxWindowNum(numWindow);
if (mExynosDisplay->mMaxWindowNum != getMaxWindowNum()) {
ALOGE("%s:: Invalid max window number (mMaxWindowNum: %d, getMaxWindowNum(): %d",
@@ -1894,11 +1908,6 @@ int32_t ExynosDisplayDrmInterface::setForcePanic()
return 0;
}
-uint32_t ExynosDisplayDrmInterface::getMaxWindowNum()
-{
- return mDrmDevice->planes().size();
-}
-
ExynosDisplayDrmInterface::DrmModeAtomicReq::DrmModeAtomicReq(ExynosDisplayDrmInterface *displayInterface)
: mDrmDisplayInterface(displayInterface)
{