diff options
author | Varad Gautam <varadgautam@gmail.com> | 2015-06-24 21:41:56 +0530 |
---|---|---|
committer | Varad Gautam <varadgautam@gmail.com> | 2015-06-27 11:44:22 +0530 |
commit | 160414c862f795bed5298825266fe90dbf28a815 (patch) | |
tree | 1db2c645b4f9ef708505e5c4945f28200bf59193 | |
parent | 613181cff0b76e52f29a655cbbb933f785798731 (diff) | |
download | drm_gralloc-160414c862f795bed5298825266fe90dbf28a815.tar.gz |
freedreno: fill in virtual buffer address after mmap
gralloc:lock() must supply virtual address for GRALLOC_USAGE_SW*
type buffers.
Signed-off-by: Varad Gautam <varadgautam@gmail.com>
-rw-r--r-- | gralloc_drm_freedreno.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/gralloc_drm_freedreno.c b/gralloc_drm_freedreno.c index 3da5a65..9b23ac9 100644 --- a/gralloc_drm_freedreno.c +++ b/gralloc_drm_freedreno.c @@ -94,7 +94,6 @@ fd_alloc(struct gralloc_drm_drv_t *drv, struct gralloc_drm_handle_t *handle) } else { int width, height, pitch; - width = handle->width; height = handle->height; gralloc_drm_align_geometry(handle->format, &width, &height); @@ -139,8 +138,10 @@ static int fd_map(struct gralloc_drm_drv_t *drv, int enable_write, void **addr) { struct fd_buffer *fd_buf = (struct fd_buffer *) bo; - if (fd_bo_map(fd_buf->bo)) + if (*addr = fd_bo_map(fd_buf->bo)) { return 0; + } + return -errno; } |