libgralloc: Fix adding offset to the mapped base address
Change-Id: I16f0625af343f6a05ee54285cdca8b6a56fc511e
This commit is contained in:
parent
ef09bce3c4
commit
f2e9c44d62
|
@ -71,7 +71,7 @@ static int gralloc_map_metadata(buffer_handle_t handle) {
|
||||||
hnd, hnd->fd_metadata, strerror(errno));
|
hnd, hnd->fd_metadata, strerror(errno));
|
||||||
return -errno;
|
return -errno;
|
||||||
}
|
}
|
||||||
hnd->base_metadata = uint64_t(mappedAddress) + hnd->offset_metadata;
|
hnd->base_metadata = uint64_t(mappedAddress);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -102,7 +102,7 @@ static int gralloc_map(gralloc_module_t const* module,
|
||||||
return -errno;
|
return -errno;
|
||||||
}
|
}
|
||||||
|
|
||||||
hnd->base = uint64_t(mappedAddress) + hnd->offset;
|
hnd->base = uint64_t(mappedAddress);
|
||||||
} else {
|
} else {
|
||||||
// Cannot map secure buffers or framebuffers, but still need to map
|
// Cannot map secure buffers or framebuffers, but still need to map
|
||||||
// metadata for secure buffers.
|
// metadata for secure buffers.
|
||||||
|
|
Loading…
Reference in New Issue