libgralloc: Fix adding offset to the mapped base address

Bug: 63662821

CRs-Fixed: 2109325
Change-Id: Icf0f653125768fa4a1b2730e1a6afae46b180144
This commit is contained in:
Ramkumar Radhakrishnan 2017-12-07 12:30:06 +05:30 committed by Uday Kiran Pichika
parent f690813f7a
commit 94ded0b0fa
1 changed files with 2 additions and 2 deletions

View File

@ -71,7 +71,7 @@ static int gralloc_map_metadata(buffer_handle_t handle) {
hnd, hnd->fd_metadata, strerror(errno));
return -errno;
}
hnd->base_metadata = uint64_t(mappedAddress) + hnd->offset_metadata;
hnd->base_metadata = uint64_t(mappedAddress);
}
return 0;
}
@ -102,7 +102,7 @@ static int gralloc_map(gralloc_module_t const* module,
return -errno;
}
hnd->base = uint64_t(mappedAddress) + hnd->offset;
hnd->base = uint64_t(mappedAddress);
} else {
// Cannot map secure buffers or framebuffers, but still need to map
// metadata for secure buffers.