[Mesa-dev] [PATCH v2 7/9] gbm: rename gbm_dri_bo_{map, unmap} to gbm_dri_bo_{map, unmap}_dumb

Rob Herring robh at kernel.org
Wed May 4 02:02:45 UTC 2016


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 at kernel.org>
---
v2:
- moved into new patch

 src/gbm/backends/dri/gbm_dri.c    | 4 ++--
 src/gbm/backends/dri/gbm_driint.h | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

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;
--
2.7.4



More information about the mesa-dev mailing list