gbm: rename gbm_dri_bo_{map,unmap} to gbm_dri_bo_{map,unmap}_dumb
authorRob Herring <robh@kernel.org>
Tue, 17 May 2016 02:14:21 +0000 (21:14 -0500)
committerEmil Velikov <emil.l.velikov@gmail.com>
Mon, 23 May 2016 11:07:46 +0000 (12:07 +0100)
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>
src/egl/drivers/dri2/platform_drm.c
src/gbm/backends/dri/gbm_dri.c
src/gbm/backends/dri/gbm_driint.h

index 3f4f7e781900e3a7abd941fad4879ed50fe88162..9373496cd0d2a2ec4ca54c59cdb8987688ba4c34 100644 (file)
@@ -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 = {
index 0625422aaf3b9dad5ad0bb83a18fff162a7eaff7..51d51dde3d0755f50ab6f175de8d5229c8c637bf 100644 (file)
@@ -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;
index 3f46effbede9b81e22cce2292dc2249a81f87246..b51cc4d90c283dccb6355fd1fd0f6a2ae6ae674b 100644 (file)
@@ -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;