diff options
Diffstat (limited to 'libhwc2.1/libresource/ExynosMPPModule.cpp')
-rw-r--r-- | libhwc2.1/libresource/ExynosMPPModule.cpp | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/libhwc2.1/libresource/ExynosMPPModule.cpp b/libhwc2.1/libresource/ExynosMPPModule.cpp index be2c834..d158f31 100644 --- a/libhwc2.1/libresource/ExynosMPPModule.cpp +++ b/libhwc2.1/libresource/ExynosMPPModule.cpp @@ -34,17 +34,24 @@ ExynosMPPModule::~ExynosMPPModule() {} * it. Once a solution is ready, the restriction need to be removed. */ bool ExynosMPPModule::checkSpecificRestriction(const uint32_t refreshRate, - const struct exynos_image &src) { - // case: downscale 4k video layer as equal or higher than 90FPS - if (refreshRate >= 90) { + const struct exynos_image &src, + const struct exynos_image &dst) { + /* additional restriction for composer in high refresh rate */ + if (mPhysicalType < MPP_DPP_NUM && refreshRate >= 90) { VendorGraphicBufferMeta gmeta(src.bufferHandle); - if (src.fullWidth == 3840 && src.w >= 3584 && src.fullHeight >= 2000 && src.h >= 1600 && - isFormatYUV(gmeta.format)) { + + if (isFormatYUV(gmeta.format)) { + if (src.fullWidth == 3840 && src.w >= 3584 && src.fullHeight >= 2000 && src.h >= 1600) { + // downscale 4k YUV layer + return true; + } + } else if (src.w >= 1680 && src.h > dst.h && (dst.h * 100 / src.h) < 60) { + // vertical downscale RGB layer return true; } } - return ExynosMPP::checkSpecificRestriction(refreshRate, src); + return ExynosMPP::checkSpecificRestriction(refreshRate, src, dst); } int64_t ExynosMPPModule::isSupported(ExynosDisplay &display, @@ -53,7 +60,7 @@ int64_t ExynosMPPModule::isSupported(ExynosDisplay &display, if (mPhysicalType < MPP_DPP_NUM && src.bufferHandle != nullptr) { const uint32_t refreshRate = display.getBtsRefreshRate(); - if (checkSpecificRestriction(refreshRate, src)) { + if (checkSpecificRestriction(refreshRate, src, dst)) { return -eMPPSatisfiedRestriction; } } |