diff options
author | Steve Pfetsch <spfetsch@google.com> | 2017-10-09 12:33:47 -0700 |
---|---|---|
committer | Kevin F. Haggerty <haggertk@lineageos.org> | 2018-07-19 20:42:04 -0600 |
commit | 740e9f9ef05060298f5180fdfdad8ada260157c8 (patch) | |
tree | 393c883958dce0aa398fbe7c711889569ec69e57 | |
parent | 060e6fe289597338183b25fc94f19f6e2ee5c592 (diff) | |
download | android_hardware_qcom_display-lineage-15.1-caf-8974.tar.gz android_hardware_qcom_display-lineage-15.1-caf-8974.tar.bz2 android_hardware_qcom_display-lineage-15.1-caf-8974.zip |
libgralloc: Fix adding offset to the mapped base addresslineage-15.1-caf-8974
Bug: 63662821
Change-Id: I722ed2560efd66e2e61a3054d7db7f6241e8e911
-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; } |