summaryrefslogtreecommitdiff
path: root/libhwc2.1/libresource/ExynosResourceManager.cpp
diff options
context:
space:
mode:
authorLong Ling <longling@google.com>2021-11-23 19:50:02 -0800
committerLong Ling <longling@google.com>2022-01-11 12:15:34 -0800
commite738bcf694db42aaee4fc9e8f416b4c1cf0cdb5b (patch)
treec61637ea063ec251d50d87ee87aebafe4dda2eeb /libhwc2.1/libresource/ExynosResourceManager.cpp
parentb1d95bc1041c4fabd9e8ba11a46590b174ba002d (diff)
hwc3: support SDR and HDR blending
Add support for setLayerWhitePointNits, setClientTargetWhitePointNits and setDisplayBrightness commands. Bug: 196171661 Change-Id: I5b2c5510ae758805396e678f1e2d5c4ea1e716b5
Diffstat (limited to 'libhwc2.1/libresource/ExynosResourceManager.cpp')
-rw-r--r--libhwc2.1/libresource/ExynosResourceManager.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/libhwc2.1/libresource/ExynosResourceManager.cpp b/libhwc2.1/libresource/ExynosResourceManager.cpp
index 502baac..d6a4770 100644
--- a/libhwc2.1/libresource/ExynosResourceManager.cpp
+++ b/libhwc2.1/libresource/ExynosResourceManager.cpp
@@ -201,6 +201,10 @@ ExynosResourceManager::ExynosResourceManager(ExynosDevice *device)
mDstBufMgrThread->mRunning = true;
mDstBufMgrThread->run("DstBufMgrThread");
+
+ char value[PROPERTY_VALUE_MAX];
+ mMinimumSdrDimRatio = property_get("debug.hwc.min_sdr_dimming", value, nullptr) > 0
+ ? std::atof(value) : 1.0f;
}
ExynosResourceManager::~ExynosResourceManager()
@@ -1130,6 +1134,9 @@ int32_t ExynosResourceManager::validateLayer(uint32_t index, ExynosDisplay *disp
(layer->mPreprocessedInfo.displayFrame.bottom > (int32_t)display->mYres))
return eInvalidDispFrame;
+ if (layer->mPreprocessedInfo.sdrDimRatio < mMinimumSdrDimRatio)
+ return eExceedSdrDimRatio;
+
return NO_ERROR;
}