summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libacryl/acrylic_g2d.h7
-rw-r--r--libacryl/hdrplugin_headers/hardware/exynos/g2d_hdr_plugin.h1
-rw-r--r--libhwc2.1/libresource/ExynosMPP.cpp6
-rw-r--r--libhwc2.1/libresource/ExynosMPP.h2
4 files changed, 11 insertions, 5 deletions
diff --git a/libacryl/acrylic_g2d.h b/libacryl/acrylic_g2d.h
index e377017..6ed5942 100644
--- a/libacryl/acrylic_g2d.h
+++ b/libacryl/acrylic_g2d.h
@@ -70,7 +70,12 @@ public:
return;
for (unsigned int i = 0; i < mCmds->layer_count; i++) {
- unsigned int idx = (mCmds->layer_hdr_mode[i].offset >> 8) - 2;
+ unsigned int idx;
+
+ if (mWriter->hasColorFillLayer())
+ idx = (mCmds->layer_hdr_mode[i].offset >> 8) - 3;
+ else
+ idx = (mCmds->layer_hdr_mode[i].offset >> 8) - 2;
// If premultiplied alpha values are de-premultied before HDR conversion,
// it should be multiplied again after the conversion. But some of the HDR processors
diff --git a/libacryl/hdrplugin_headers/hardware/exynos/g2d_hdr_plugin.h b/libacryl/hdrplugin_headers/hardware/exynos/g2d_hdr_plugin.h
index 02b863a..aefed60 100644
--- a/libacryl/hdrplugin_headers/hardware/exynos/g2d_hdr_plugin.h
+++ b/libacryl/hdrplugin_headers/hardware/exynos/g2d_hdr_plugin.h
@@ -39,6 +39,7 @@ public:
virtual void setTargetDisplayLuminance(unsigned int __unused min, unsigned int __unused max) { };
virtual struct g2d_commandlist *getCommands() = 0;
virtual void putCommands(struct g2d_commandlist __unused *commands) { };
+ virtual bool hasColorFillLayer(void) { return false; }
};
#endif/* __LIBACRYL_PLUGIN_G2D_HDR_H__ */
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);