diff options
author | huans | 2018-06-01 16:26:57 -0500 |
---|---|---|
committer | huans | 2018-06-01 16:33:30 -0500 |
commit | f579ea47aa9a742c21811fdaab303ad7176362ea (patch) | |
tree | eb2cee4449f2854fcfc17e561072634f82a54214 /graphics | |
parent | 4f0635a2a9578cb2fb90d345346c4711b69ff139 (diff) | |
download | platform-hardware-interfaces-f579ea47aa9a742c21811fdaab303ad7176362ea.tar.gz platform-hardware-interfaces-f579ea47aa9a742c21811fdaab303ad7176362ea.tar.xz platform-hardware-interfaces-f579ea47aa9a742c21811fdaab303ad7176362ea.zip |
SetColorMode is not available for vendor hwc less than 1.4
Bug: 90510785
Test: VTS VtsHalGraphicsComposerV2_1Target SetColorMode(default) pass
Change-Id: Ia295b3ef2f0f433a7e1b5179eb230b8f7c649400
Diffstat (limited to 'graphics')
-rw-r--r-- | graphics/composer/2.1/utils/hwc2on1adapter/HWC2On1Adapter.cpp | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/graphics/composer/2.1/utils/hwc2on1adapter/HWC2On1Adapter.cpp b/graphics/composer/2.1/utils/hwc2on1adapter/HWC2On1Adapter.cpp index 77f06bbb..6551a99a 100644 --- a/graphics/composer/2.1/utils/hwc2on1adapter/HWC2On1Adapter.cpp +++ b/graphics/composer/2.1/utils/hwc2on1adapter/HWC2On1Adapter.cpp | |||
@@ -858,18 +858,20 @@ Error HWC2On1Adapter::Display::setColorMode(android_color_mode_t mode) { | |||
858 | return Error::Unsupported; | 858 | return Error::Unsupported; |
859 | } | 859 | } |
860 | 860 | ||
861 | uint32_t hwc1Config = 0; | 861 | if (mDevice.mHwc1MinorVersion >= 4) { |
862 | auto error = mActiveConfig->getHwc1IdForColorMode(mode, &hwc1Config); | 862 | uint32_t hwc1Config = 0; |
863 | if (error != Error::None) { | 863 | auto error = mActiveConfig->getHwc1IdForColorMode(mode, &hwc1Config); |
864 | return error; | 864 | if (error != Error::None) { |
865 | } | 865 | return error; |
866 | } | ||
866 | 867 | ||
867 | ALOGV("[%" PRIu64 "] Setting HWC1 config %u", mId, hwc1Config); | 868 | ALOGV("[%" PRIu64 "] Setting HWC1 config %u", mId, hwc1Config); |
868 | int intError = mDevice.mHwc1Device->setActiveConfig(mDevice.mHwc1Device, | 869 | int intError = |
869 | mHwc1Id, hwc1Config); | 870 | mDevice.mHwc1Device->setActiveConfig(mDevice.mHwc1Device, mHwc1Id, hwc1Config); |
870 | if (intError != 0) { | 871 | if (intError != 0) { |
871 | ALOGE("[%" PRIu64 "] Failed to set HWC1 config (%d)", mId, intError); | 872 | ALOGE("[%" PRIu64 "] Failed to set HWC1 config (%d)", mId, intError); |
872 | return Error::Unsupported; | 873 | return Error::Unsupported; |
874 | } | ||
873 | } | 875 | } |
874 | 876 | ||
875 | mActiveColorMode = mode; | 877 | mActiveColorMode = mode; |