summaryrefslogtreecommitdiffstats
path: root/sdm
diff options
context:
space:
mode:
authorAnjaneya Prasad Musunuri <aprasad@codeaurora.org>2018-04-29 17:25:12 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2018-05-07 10:25:16 -0700
commit4a342c7ab0588b04ad5ccf7b7ab557025f05edc0 (patch)
treecffc3432bca8c1d515f9746452a72c5ac8f9f6b3 /sdm
parentfdb37a6befd589ff44aa230fb45d4213d4570812 (diff)
downloadandroid_hardware_qcom_sdm710_display-4a342c7ab0588b04ad5ccf7b7ab557025f05edc0.tar.gz
android_hardware_qcom_sdm710_display-4a342c7ab0588b04ad5ccf7b7ab557025f05edc0.tar.bz2
android_hardware_qcom_sdm710_display-4a342c7ab0588b04ad5ccf7b7ab557025f05edc0.zip
hwc2: Get Mapper instance in frame dump utility
Mapper instance is not available if frame dump is called prior to buffer allocation through hwc buffer allocator. Change-Id: I2b92aa594978d996be8f0036ac7c006fe23d3efa CRs-Fixed: 2233209
Diffstat (limited to 'sdm')
-rw-r--r--sdm/libs/hwc2/hwc_buffer_allocator.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/sdm/libs/hwc2/hwc_buffer_allocator.cpp b/sdm/libs/hwc2/hwc_buffer_allocator.cpp
index dab98858..e1d32db4 100644
--- a/sdm/libs/hwc2/hwc_buffer_allocator.cpp
+++ b/sdm/libs/hwc2/hwc_buffer_allocator.cpp
@@ -397,6 +397,10 @@ DisplayError HWCBufferAllocator::GetBufferLayout(const AllocatedBufferInfo &buf_
}
DisplayError HWCBufferAllocator::MapBuffer(const private_handle_t *handle, int acquire_fence) {
+ auto err = GetGrallocInstance();
+ if (err != kErrorNone) {
+ return err;
+ }
void *buffer_ptr = NULL;
const IMapper::Rect access_region = {.left = 0, .top = 0, .width = 0, .height = 0};