diff options
author | Peiyong Lin <lpy@google.com> | 2019-04-10 16:18:50 -0700 |
---|---|---|
committer | Peiyong Lin <lpy@google.com> | 2019-04-10 16:18:50 -0700 |
commit | b19125ea4fdef0a7567679d02695a53a6784dd90 (patch) | |
tree | 6903246d6fcbc0cff17332c3d07692498dd7c652 | |
parent | abc5bd873e54d74d396dc280205d608f72b000dc (diff) | |
download | display-b19125ea4fdef0a7567679d02695a53a6784dd90.tar.gz |
Register GET_DISPLAY_CAPABILITIES function pointer correctly.
BUG: 130195295
Test: atest VtsHalGraphicsComposerV2_3Target
Change-Id: I1e1b6754c0c7703b413c12800eceef76d1927ee8
-rw-r--r-- | sdm/libs/hwc2/hwc_session.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sdm/libs/hwc2/hwc_session.cpp b/sdm/libs/hwc2/hwc_session.cpp index 5784a1dd..a2cd6f60 100644 --- a/sdm/libs/hwc2/hwc_session.cpp +++ b/sdm/libs/hwc2/hwc_session.cpp @@ -992,7 +992,7 @@ int32_t HWCSession::SetDisplayBrightness(hwc2_device_t *device, hwc2_display_t d return INT32(status); } if (!brightness_support) { - return INT32(HWC2::Error::BadDisplay); + return HWC2_ERROR_UNSUPPORTED; } int backlight = -1; if (brightness == -1.0f) { @@ -1143,10 +1143,12 @@ hwc2_function_pointer_t HWCSession::GetFunction(struct hwc2_device *device, return AsFP<HWC2_PFN_GET_DISPLAYED_CONTENT_SAMPLING_ATTRIBUTES>(GetDisplayedContentSamplingAttributes); case HWC2::FunctionDescriptor::GetDisplayedContentSample: return AsFP<HWC2_PFN_GET_DISPLAYED_CONTENT_SAMPLE>(GetDisplayedContentSample); + case HWC2::FunctionDescriptor::GetDisplayCapabilities: + return AsFP<HWC2_PFN_GET_DISPLAY_CAPABILITIES>(GetDisplayCapabilities); case HWC2::FunctionDescriptor::GetDisplayBrightnessSupport: - return AsFP<HWC2_PFN_GET_DISPLAY_BRIGHTNESS_SUPPORT>(GetDisplayBrightnessSupport); + return AsFP<HWC2_PFN_GET_DISPLAY_BRIGHTNESS_SUPPORT>(GetDisplayBrightnessSupport); case HWC2::FunctionDescriptor::SetDisplayBrightness: - return AsFP<HWC2_PFN_SET_DISPLAY_BRIGHTNESS>(SetDisplayBrightness); + return AsFP<HWC2_PFN_SET_DISPLAY_BRIGHTNESS>(SetDisplayBrightness); default: DLOGD("Unknown/Unimplemented function descriptor: %d (%s)", int_descriptor, to_string(descriptor).c_str()); |