summaryrefslogtreecommitdiffstats
path: root/rockchip.c
diff options
context:
space:
mode:
authorGurchetan Singh <gurchetansingh@chromium.org>2016-10-06 10:58:00 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-10-13 04:32:23 -0700
commit1a31e609770088ad0e5abb49678174e4c6393d34 (patch)
tree10cc530d21282f1e6381b661ad567a7f3b62b49c /rockchip.c
parent602bd16a60a01ebb0ce911712256047df18acaa5 (diff)
downloadplatform_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.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/rockchip.c b/rockchip.c
index ae6c15b..ae0b25f 100644
--- a/rockchip.c
+++ b/rockchip.c
@@ -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);
}