diff options
author | Rob Herring <robh@kernel.org> | 2016-05-16 21:14:21 -0500 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2016-05-23 12:07:46 +0100 |
commit | 0a4275b5343974073ca7c35fa1ff3c5b581573b8 (patch) | |
tree | 0b63a372f70e9d2cfa97143e082b54fa757c9f6b | |
parent | e8431a630d64a39c1cf2feda08e0450d4e522d7d (diff) | |
download | external_mesa3d-0a4275b5343974073ca7c35fa1ff3c5b581573b8.zip external_mesa3d-0a4275b5343974073ca7c35fa1ff3c5b581573b8.tar.gz external_mesa3d-0a4275b5343974073ca7c35fa1ff3c5b581573b8.tar.bz2 |
gbm: rename gbm_dri_bo_{map,unmap} to gbm_dri_bo_{map,unmap}_dumb
In preparation to add public map/unmap functions, rename the existing
gbm_dri_bo_{map,unmap} functions to indicate that they are only for dumb
buffers.
Signed-off-by: Rob Herring <robh@kernel.org>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
-rw-r--r-- | src/egl/drivers/dri2/platform_drm.c | 8 | ||||
-rw-r--r-- | src/gbm/backends/dri/gbm_dri.c | 4 | ||||
-rw-r--r-- | src/gbm/backends/dri/gbm_driint.h | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/egl/drivers/dri2/platform_drm.c b/src/egl/drivers/dri2/platform_drm.c index 3f4f7e7..9373496 100644 --- a/src/egl/drivers/dri2/platform_drm.c +++ b/src/egl/drivers/dri2/platform_drm.c @@ -534,7 +534,7 @@ swrast_put_image2(__DRIdrawable *driDrawable, return; bo = gbm_dri_bo(dri2_surf->current->bo); - if (gbm_dri_bo_map(bo) == NULL) + if (gbm_dri_bo_map_dumb(bo) == NULL) return; internal_stride = bo->base.base.stride; @@ -544,7 +544,7 @@ swrast_put_image2(__DRIdrawable *driDrawable, data + i * stride, stride); } - gbm_dri_bo_unmap(bo); + gbm_dri_bo_unmap_dumb(bo); } static void @@ -564,7 +564,7 @@ swrast_get_image(__DRIdrawable *driDrawable, return; bo = gbm_dri_bo(dri2_surf->current->bo); - if (gbm_dri_bo_map(bo) == NULL) + if (gbm_dri_bo_map_dumb(bo) == NULL) return; internal_stride = bo->base.base.stride; @@ -575,7 +575,7 @@ swrast_get_image(__DRIdrawable *driDrawable, bo->map + (x + i) * internal_stride + y, stride); } - gbm_dri_bo_unmap(bo); + gbm_dri_bo_unmap_dumb(bo); } static struct dri2_egl_display_vtbl dri2_drm_display_vtbl = { diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c index 0625422..51d51dd 100644 --- a/src/gbm/backends/dri/gbm_dri.c +++ b/src/gbm/backends/dri/gbm_dri.c @@ -603,7 +603,7 @@ gbm_dri_bo_destroy(struct gbm_bo *_bo) if (bo->image != NULL) { dri->image->destroyImage(bo->image); } else { - gbm_dri_bo_unmap(bo); + gbm_dri_bo_unmap_dumb(bo); memset(&arg, 0, sizeof(arg)); arg.handle = bo->handle; drmIoctl(dri->base.base.fd, DRM_IOCTL_MODE_DESTROY_DUMB, &arg); @@ -828,7 +828,7 @@ create_dumb(struct gbm_device *gbm, bo->handle = create_arg.handle; bo->size = create_arg.size; - if (gbm_dri_bo_map(bo) == NULL) + if (gbm_dri_bo_map_dumb(bo) == NULL) goto destroy_dumb; return &bo->base.base; diff --git a/src/gbm/backends/dri/gbm_driint.h b/src/gbm/backends/dri/gbm_driint.h index 3f46eff..b51cc4d 100644 --- a/src/gbm/backends/dri/gbm_driint.h +++ b/src/gbm/backends/dri/gbm_driint.h @@ -130,7 +130,7 @@ gbm_dri_surface(struct gbm_surface *surface) } static inline void * -gbm_dri_bo_map(struct gbm_dri_bo *bo) +gbm_dri_bo_map_dumb(struct gbm_dri_bo *bo) { struct drm_mode_map_dumb map_arg; int ret; @@ -159,7 +159,7 @@ gbm_dri_bo_map(struct gbm_dri_bo *bo) } static inline void -gbm_dri_bo_unmap(struct gbm_dri_bo *bo) +gbm_dri_bo_unmap_dumb(struct gbm_dri_bo *bo) { munmap(bo->map, bo->size); bo->map = NULL; |