summaryrefslogtreecommitdiff
path: root/libhwc2.1/libresource
diff options
context:
space:
mode:
Diffstat (limited to 'libhwc2.1/libresource')
-rw-r--r--libhwc2.1/libresource/ExynosMPPModule.cpp21
-rw-r--r--libhwc2.1/libresource/ExynosMPPModule.h3
2 files changed, 16 insertions, 8 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;
}
}
diff --git a/libhwc2.1/libresource/ExynosMPPModule.h b/libhwc2.1/libresource/ExynosMPPModule.h
index 94506f9..662c2c4 100644
--- a/libhwc2.1/libresource/ExynosMPPModule.h
+++ b/libhwc2.1/libresource/ExynosMPPModule.h
@@ -31,7 +31,8 @@ class ExynosMPPModule : public gs101::ExynosMPPModule {
virtual int64_t isSupported(ExynosDisplay &display, struct exynos_image &src,
struct exynos_image &dst);
virtual bool checkSpecificRestriction(const uint32_t __unused refreshRate,
- const struct exynos_image &src);
+ const struct exynos_image &src,
+ const struct exynos_image &dst);
};
} // namespace gs201