diff options
author | HyunKyung Kim <hk310.kim@samsung.com> | 2020-02-24 11:33:06 +0900 |
---|---|---|
committer | HyunKyung Kim <hk310.kim@samsung.com> | 2020-03-13 09:30:55 +0900 |
commit | ac25c2349d85b7c8e696eec896ff39554c6f5ce3 (patch) | |
tree | 0570d19207841f5189a4d8c5a636ce31d3cc5d8f /libhwc2.1/libdisplayinterface/ExynosDeviceDrmInterface.cpp | |
parent | a6f2977521d0b44d0f9c2310b3d97ce65df45e90 (diff) |
libhwc2.1: Cleanup for drmFormatToHalFormats()
Bug: 150034262
Change-Id: Ieaa0cd0300795556db9efcda5dfde5e08f3fc8d1
Signed-off-by: HyunKyung Kim <hk310.kim@samsung.com>
Diffstat (limited to 'libhwc2.1/libdisplayinterface/ExynosDeviceDrmInterface.cpp')
-rw-r--r-- | libhwc2.1/libdisplayinterface/ExynosDeviceDrmInterface.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libhwc2.1/libdisplayinterface/ExynosDeviceDrmInterface.cpp b/libhwc2.1/libdisplayinterface/ExynosDeviceDrmInterface.cpp index 9f67df1..1c857b9 100644 --- a/libhwc2.1/libdisplayinterface/ExynosDeviceDrmInterface.cpp +++ b/libhwc2.1/libdisplayinterface/ExynosDeviceDrmInterface.cpp @@ -123,14 +123,15 @@ void ExynosDeviceDrmInterface::updateRestrictions() } /* Set supported format information */ for (auto format : plane->formats()) { - uint32_t halFormatNum = 0; - uint32_t halFormats[MAX_SAME_HAL_PIXEL_FORMAT]; - + std::vector<uint32_t> halFormats; + if (drmFormatToHalFormats(format, &halFormats) != NO_ERROR) { + ALOGE("Fail to convert drm format(%d)", format); + continue; + } int &formatIndex = mDPUInfo.dpuInfo.dpp_ch[channelId].restriction.format_cnt; - drmFormatToHalFormats(format, &halFormatNum, halFormats); - for (uint32_t i = 0; i < halFormatNum; i++) { + for (auto halFormat : halFormats) { mDPUInfo.dpuInfo.dpp_ch[channelId].restriction.format[formatIndex] = - halFormats[i]; + halFormat; formatIndex++; } } |