diff options
author | Long Ling <longling@google.com> | 2023-03-13 13:45:46 -0700 |
---|---|---|
committer | Long Ling <longling@google.com> | 2023-03-21 17:25:50 -0700 |
commit | 8acf9dec78bdee3af320a1f736408c479de237d6 (patch) | |
tree | af679bcebeb6b69e2d56746180c28aa44fa98ef1 | |
parent | 3e4ac183f0da7b6d6bc36259b1d2b1b1f6896d9e (diff) |
libhwc2.1: RGB HDR layer requires DTM
In current code DTM is not required by HDR layer. It works for HDR video
because the HW layer processes video layer has the DTM stage.
This change will ensure RGB HDR layer gets tone mapped.
Bug: 266757412
Test: show and check HDR10, HDR10+ video and RGB HDR layer
Change-Id: Id1101b9b59fe267c9904c5309c36f75c1cbdddce
-rw-r--r-- | libhwc2.1/libresource/ExynosMPP.cpp | 6 | ||||
-rw-r--r-- | libhwc2.1/libresource/ExynosMPP.h | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/libhwc2.1/libresource/ExynosMPP.cpp b/libhwc2.1/libresource/ExynosMPP.cpp index 7217f20..ae30482 100644 --- a/libhwc2.1/libresource/ExynosMPP.cpp +++ b/libhwc2.1/libresource/ExynosMPP.cpp @@ -351,7 +351,7 @@ bool ExynosMPP::isDataspaceSupportedByMPP(struct exynos_image &src, struct exyno return checkCSCRestriction(src, dst); } -bool ExynosMPP::isSupportedHDR10Plus(struct exynos_image &src, struct exynos_image &dst) +bool ExynosMPP::isSupportedHDR(struct exynos_image &src, struct exynos_image &dst) { uint32_t srcStandard = (src.dataSpace & HAL_DATASPACE_STANDARD_MASK); @@ -359,7 +359,7 @@ bool ExynosMPP::isSupportedHDR10Plus(struct exynos_image &src, struct exynos_ima uint32_t srcTransfer = (src.dataSpace & HAL_DATASPACE_TRANSFER_MASK); uint32_t dstTransfer = (dst.dataSpace & HAL_DATASPACE_TRANSFER_MASK); - if (hasHdr10Plus(src)) { + if (hasHdr10Plus(src) || hasHdrInfo(src) ) { if (mAttr & MPP_ATTR_HDR10PLUS) return true; else if ((srcStandard == dstStandard) && (srcTransfer == dstTransfer)) @@ -2100,7 +2100,7 @@ int64_t ExynosMPP::isSupported(ExynosDisplay &display, struct exynos_image &src, return -eMPPUnsupportedFormat; else if (!isDataspaceSupportedByMPP(src, dst)) return -eMPPUnsupportedCSC; - else if (!isSupportedHDR10Plus(src, dst)) + else if (!isSupportedHDR(src, dst)) return -eMPPUnsupportedDynamicMeta; else if (!isSupportedBlend(src)) return -eMPPUnsupportedBlending; diff --git a/libhwc2.1/libresource/ExynosMPP.h b/libhwc2.1/libresource/ExynosMPP.h index aadc72b..715c9dc 100644 --- a/libhwc2.1/libresource/ExynosMPP.h +++ b/libhwc2.1/libresource/ExynosMPP.h @@ -597,7 +597,7 @@ public: virtual int64_t isSupported(ExynosDisplay &display, struct exynos_image &src, struct exynos_image &dst); bool isDataspaceSupportedByMPP(struct exynos_image &src, struct exynos_image &dst); - bool isSupportedHDR10Plus(struct exynos_image &src, struct exynos_image &dst); + bool isSupportedHDR(struct exynos_image &src, struct exynos_image &dst); bool isSupportedBlend(struct exynos_image &src); virtual bool isSupportedTransform(struct exynos_image &src); bool isSupportedCapability(ExynosDisplay &display, struct exynos_image &src); |