diff options
| author | Gurchetan Singh <gurchetansingh@chromium.org> | 2016-10-06 10:58:00 -0700 |
|---|---|---|
| committer | chrome-bot <chrome-bot@chromium.org> | 2016-10-13 04:32:23 -0700 |
| commit | 1a31e609770088ad0e5abb49678174e4c6393d34 (patch) | |
| tree | 10cc530d21282f1e6381b661ad567a7f3b62b49c /rockchip.c | |
| parent | 602bd16a60a01ebb0ce911712256047df18acaa5 (diff) | |
| download | platform_external_minigbm-1a31e609770088ad0e5abb49678174e4c6393d34.tar.gz platform_external_minigbm-1a31e609770088ad0e5abb49678174e4c6393d34.tar.bz2 platform_external_minigbm-1a31e609770088ad0e5abb49678174e4c6393d34.zip | |
minigbm: More sophisticated gbm_bo_map/gbm_bo_unmap
We previously added the gbm_bo_map/gbm_bo_unmap (see CL:393927)
entry points since we wanted to do driver-specific detiling during
screenshot capture tests. We ignored most the parameters and mapped
the entire buffer. This CL adds the ability to:
1) Return the starting address within a byte given a specific x, y
in the buffer.
2) Handle the case where there are more than one kernel buffers
per buffer object. Currently, only the Exynos driver would use
this capability.
BUG=chromium:653284
TEST=Ran cros_gralloc with modified code
CQ-DEPEND=CL:393927
Change-Id: I19d75d2f16489c0184e96305fb643f18477e1cdb
Reviewed-on: https://chromium-review.googlesource.com/395066
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 | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -50,7 +50,7 @@ static int rockchip_bo_create(struct bo *bo, uint32_t width, uint32_t height, return 0; } -static void *rockchip_bo_map(struct bo *bo) +static void *rockchip_bo_map(struct bo *bo, struct map_info *data, size_t plane) { int ret; struct drm_rockchip_gem_map_off gem_map; @@ -66,6 +66,8 @@ static void *rockchip_bo_map(struct bo *bo) return MAP_FAILED; } + data->length = bo->total_size; + return mmap(0, bo->total_size, PROT_READ | PROT_WRITE, MAP_SHARED, bo->drv->fd, gem_map.offset); } |
