diff options
author | YongWook Shin <yongwook.shin@samsung.com> | 2021-04-28 16:57:10 +0900 |
---|---|---|
committer | Long Ling <longling@google.com> | 2021-09-27 16:01:22 -0700 |
commit | eb8d178e148d97690d9f0230ef46563d35386d51 (patch) | |
tree | e4ad8f773eca7a11599d9442e6c00049be12dccb /libhwc2.1/libdisplayinterface/ExynosDeviceDrmInterface.cpp | |
parent | db496a5e8e05743ff7bf7af95134755b3b29cc03 (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/ExynosDeviceDrmInterface.cpp')
-rw-r--r-- | libhwc2.1/libdisplayinterface/ExynosDeviceDrmInterface.cpp | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/libhwc2.1/libdisplayinterface/ExynosDeviceDrmInterface.cpp b/libhwc2.1/libdisplayinterface/ExynosDeviceDrmInterface.cpp index c844b72..e77d4ab 100644 --- a/libhwc2.1/libdisplayinterface/ExynosDeviceDrmInterface.cpp +++ b/libhwc2.1/libdisplayinterface/ExynosDeviceDrmInterface.cpp @@ -107,17 +107,19 @@ int32_t ExynosDeviceDrmInterface::initDisplayInterface( void ExynosDeviceDrmInterface::updateRestrictions() { int32_t ret = 0; - - mDPUInfo.dpuInfo.dpp_chs.resize(mDrmDevice->planes().size()); uint32_t channelId = 0; for (auto &plane : mDrmDevice->planes()) { + struct hwc_dpp_ch_restriction hwc_res; + /* Set size restriction information */ if (plane->hw_restrictions_property().id()) { uint64_t blobId; + std::tie(ret, blobId) = plane->hw_restrictions_property().value(); if (ret) break; + struct dpp_ch_restriction *res; drmModePropertyBlobPtr blob = drmModeGetPropertyBlob(mDrmDevice->fd(), blobId); if (!blob) { @@ -126,13 +128,14 @@ void ExynosDeviceDrmInterface::updateRestrictions() break; } res = (struct dpp_ch_restriction *)blob->data; - set_dpp_ch_restriction(mDPUInfo.dpuInfo.dpp_chs[channelId], *res); + set_dpp_ch_restriction(hwc_res, *res); drmModeFreePropertyBlob(blob); } else { ALOGI("plane[%d] There is no hw restriction information", channelId); ret = HWC2_ERROR_UNSUPPORTED; break; } + /* Set supported format information */ for (auto format : plane->formats()) { std::vector<uint32_t> halFormats; @@ -141,11 +144,17 @@ void ExynosDeviceDrmInterface::updateRestrictions() continue; } for (auto halFormat : halFormats) { - mDPUInfo.dpuInfo.dpp_chs[channelId].restriction.formats.push_back(halFormat); + hwc_res.restriction.formats.push_back(halFormat); } } - if (hwcCheckDebugMessages(eDebugAttrSetting)) - printDppRestriction(mDPUInfo.dpuInfo.dpp_chs[channelId]); + + if (hwcCheckDebugMessages(eDebugDefault)) + printDppRestriction(hwc_res); + + if (plane->isFormatSupported(DRM_FORMAT_C8) && plane->getNumFormatSupported() == 1) + mDPUInfo.dpuInfo.spp_chs.push_back(hwc_res); + else + mDPUInfo.dpuInfo.dpp_chs.push_back(hwc_res); channelId++; } |