summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYongWook Shin <yongwook.shin@samsung.com>2023-01-02 17:31:44 +0900
committerjoenchen <joenchen@google.com>2023-05-10 15:07:26 +0000
commit466f2a9cfec1a64a204b15d0cb04a3989cbc4797 (patch)
treec205754538ec81a51832bbd5b2dff0351fe766f9
parent25001f3ea723c503414ba6cb8dcc8461a04fb6c2 (diff)
libhwc2.1: skip to disable unsupported plane
When disable unused planes, the planes which are unsupported by CRTC should be skipped to avoid abnormal configurations. Bug: 238373481 Bug: 263989425 Test: power on/off display Change-Id: Ib14f03446b855d87c5f660775c6e803abb596339 Signed-off-by: YongWook Shin <yongwook.shin@samsung.com> Signed-off-by: Petri Gynther <pgynther@google.com> Merged-In: I627afe439e0a744532ff3aa4cf094dc4fd9d4b1d
-rw-r--r--libhwc2.1/libdisplayinterface/ExynosDisplayDrmInterface.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/libhwc2.1/libdisplayinterface/ExynosDisplayDrmInterface.cpp b/libhwc2.1/libdisplayinterface/ExynosDisplayDrmInterface.cpp
index 267b4b9..af4facc 100644
--- a/libhwc2.1/libdisplayinterface/ExynosDisplayDrmInterface.cpp
+++ b/libhwc2.1/libdisplayinterface/ExynosDisplayDrmInterface.cpp
@@ -1863,6 +1863,11 @@ int32_t ExynosDisplayDrmInterface::deliverWinConfigData()
(plane->id() != static_cast<ExynosPrimaryDisplay *>(mExynosDisplay)->mRcdId))
continue;
+ /* If this plane is not supported by the CRTC binded with ExynosDisplay,
+ * it should be disabled by this ExynosDisplay */
+ if (!plane->GetCrtcSupported(*mDrmCrtc))
+ continue;
+
if ((ret = drmReq.atomicAddProperty(plane->id(),
plane->crtc_property(), 0)) < 0)
return ret;
@@ -2008,6 +2013,11 @@ int32_t ExynosDisplayDrmInterface::clearDisplayPlanes(DrmModeAtomicReq &drmReq)
(exynosMPP->mReservedDisplay != (int32_t)mExynosDisplay->mDisplayId))
continue;
+ /* If this plane is not supported by the CRTC binded with ExynosDisplay,
+ * it should not be disabled by this ExynosDisplay */
+ if (!plane->GetCrtcSupported(*mDrmCrtc))
+ continue;
+
if ((ret = drmReq.atomicAddProperty(plane->id(),
plane->crtc_property(), 0)) < 0) {
break;