diff options
author | Gurchetan Singh <gurchetansingh@chromium.org> | 2016-08-29 19:51:45 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-09-02 21:16:59 -0700 |
commit | a40ca9e44611b763646795427100e183443dcf33 (patch) | |
tree | b0c78d41d7cd095d588eba832f1cd11787b1b4c1 /rockchip.c | |
parent | 42cc6d6c2a93f585daad4c70398edfd770578683 (diff) |
minigbm: Map and unmap correct size
We were not mapping the entire buffer for multi-plane buffer objects.
BUG=chromium:616275
TEST=NONE
CQ-DEPEND=CL:377884
Change-Id: Ia64a6eb45310abeaed3f376479a6738ccd09f0bf
Reviewed-on: https://chromium-review.googlesource.com/377841
Commit-Ready: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
Diffstat (limited to 'rockchip.c')
-rw-r--r-- | rockchip.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -33,8 +33,7 @@ static int rockchip_bo_create(struct bo *bo, uint32_t width, uint32_t height, drv_bo_from_format(bo, width, height, format); memset(&gem_create, 0, sizeof(gem_create)); - gem_create.size = bo->offsets[bo->num_planes - 1] + - bo->sizes[bo->num_planes - 1]; + gem_create.size = bo->total_size; ret = drmIoctl(bo->drv->fd, DRM_IOCTL_ROCKCHIP_GEM_CREATE, &gem_create); @@ -67,7 +66,7 @@ static void *rockchip_bo_map(struct bo *bo) return MAP_FAILED; } - return mmap(0, bo->sizes[0], PROT_READ | PROT_WRITE, MAP_SHARED, + return mmap(0, bo->total_size, PROT_READ | PROT_WRITE, MAP_SHARED, bo->drv->fd, gem_map.offset); } |