diff options
author | Steve Pfetsch <spfetsch@google.com> | 2017-10-09 12:33:47 -0700 |
---|---|---|
committer | Kevin Haggerty <haggertk@lineageos.org> | 2018-07-28 04:42:09 +0200 |
commit | 966a222f0a09e69bbdd730ad847bfe1f78fce68a (patch) | |
tree | ff6eb7ef2f7cc9a937cc3a5c8c2fb198af3392fb | |
parent | 24176c9dffe0dfefd687b466e2ae581d02e56144 (diff) | |
download | android_hardware_qcom_display-cm-14.1-caf-8974.tar.gz android_hardware_qcom_display-cm-14.1-caf-8974.tar.bz2 android_hardware_qcom_display-cm-14.1-caf-8974.zip |
libgralloc: Fix adding offset to the mapped base addresscm-14.1-caf-8974
Bug: 63662821
Change-Id: I722ed2560efd66e2e61a3054d7db7f6241e8e911
(cherry picked from commit 740e9f9ef05060298f5180fdfdad8ada260157c8)
-rw-r--r-- | libgralloc/mapper.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libgralloc/mapper.cpp b/libgralloc/mapper.cpp index 8464d8619..1d8ac8090 100644 --- a/libgralloc/mapper.cpp +++ b/libgralloc/mapper.cpp @@ -73,7 +73,7 @@ static int gralloc_map(gralloc_module_t const* /*module*/, return -errno; } - hnd->base = intptr_t(mappedAddress) + hnd->offset; + hnd->base = intptr_t(mappedAddress); mappedAddress = MAP_FAILED; size = ROUND_UP_PAGESIZE(sizeof(MetaData_t)); err = memalloc->map_buffer(&mappedAddress, size, @@ -84,7 +84,7 @@ static int gralloc_map(gralloc_module_t const* /*module*/, hnd->base_metadata = 0; return -errno; } - hnd->base_metadata = intptr_t(mappedAddress) + hnd->offset_metadata; + hnd->base_metadata = intptr_t(mappedAddress); } return 0; } |