summaryrefslogtreecommitdiff
path: root/sdm/libs/hwc2/hwc_session.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'sdm/libs/hwc2/hwc_session.cpp')
-rw-r--r--sdm/libs/hwc2/hwc_session.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/sdm/libs/hwc2/hwc_session.cpp b/sdm/libs/hwc2/hwc_session.cpp
index e4404648..570e0fe3 100644
--- a/sdm/libs/hwc2/hwc_session.cpp
+++ b/sdm/libs/hwc2/hwc_session.cpp
@@ -1355,6 +1355,14 @@ android::status_t HWCSession::notifyCallback(uint32_t command, const android::Pa
status = SetIdlePC(input_parcel);
break;
+ case qService::IQService::SET_WHITE_POINT_COMPENSATION:
+ if (!input_parcel) {
+ DLOGE("QService command = %d: input_parcel needed.", command);
+ break;
+ }
+ status = SetWhiteCompensation(input_parcel);
+ break;
+
default:
DLOGW("QService command = %d is not supported.", command);
break;
@@ -1551,6 +1559,18 @@ android::status_t HWCSession::SetColorModeOverride(const android::Parcel *input_
return 0;
}
+android::status_t HWCSession::SetWhiteCompensation(const android::Parcel *input_parcel) {
+ auto display = static_cast<hwc2_display_t >(input_parcel->readInt32());
+ auto enabled = static_cast<bool >(input_parcel->readInt32());
+ auto device = static_cast<hwc2_device_t *>(this);
+
+ auto err = CallDisplayFunction(device, display, &HWCDisplay::SetWhiteCompensation, enabled);
+ if (err != HWC2_ERROR_NONE)
+ return -EINVAL;
+
+ return 0;
+}
+
android::status_t HWCSession::SetColorModeWithRenderIntentOverride(
const android::Parcel *input_parcel) {
auto display = static_cast<hwc2_display_t>(input_parcel->readInt32());