X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=rockchip.c;h=66f1ea0da01d7be8a8544f9b12254ea0e3429fb0;hb=4b5d0bf2ab4da0f475f01575fb369b7eb9415d7c;hp=5a907f0b12648bc9227d528e8f678faf9f0b0510;hpb=ce1ae023e9d389eda397b5a4f463be442fd859e7;p=android-x86%2Fexternal-minigbm.git diff --git a/rockchip.c b/rockchip.c index 5a907f0..66f1ea0 100644 --- a/rockchip.c +++ b/rockchip.c @@ -225,7 +225,7 @@ static int rockchip_bo_create(struct bo *bo, uint32_t width, uint32_t height, ui ARRAY_SIZE(modifiers)); } -static void *rockchip_bo_map(struct bo *bo, struct map_info *data, size_t plane) +static void *rockchip_bo_map(struct bo *bo, struct map_info *data, size_t plane, int prot) { int ret; struct drm_rockchip_gem_map_off gem_map; @@ -246,8 +246,7 @@ static void *rockchip_bo_map(struct bo *bo, struct map_info *data, size_t plane) data->length = bo->total_size; - return mmap(0, bo->total_size, PROT_READ | PROT_WRITE, MAP_SHARED, bo->drv->fd, - gem_map.offset); + return mmap(0, bo->total_size, prot, MAP_SHARED, bo->drv->fd, gem_map.offset); } static uint32_t rockchip_resolve_format(uint32_t format, uint64_t usage)