drm/msm: Replace drm_gem_object_{un/reference} with put, get functions
authorThomas Zimmermann <tzimmermann@suse.de>
Wed, 26 Sep 2018 11:48:58 +0000 (13:48 +0200)
committerRob Clark <robdclark@gmail.com>
Thu, 4 Oct 2018 00:24:55 +0000 (20:24 -0400)
This patch unifies the naming of DRM functions for reference counting
of struct drm_gem_object. The resulting code is more aligned with the
rest of the Linux kernel interfaces.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Reviewed-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/adreno/a5xx_debugfs.c
drivers/gpu/drm/msm/adreno/a5xx_gpu.c
drivers/gpu/drm/msm/adreno/a5xx_power.c
drivers/gpu/drm/msm/adreno/a5xx_preempt.c
drivers/gpu/drm/msm/adreno/a6xx_gpu.c
drivers/gpu/drm/msm/msm_gem_submit.c

index 059ec7d394d0e799287d6f64902d00ae165d2b2a..d2127b1c4eced57a0fa2233550258c17d449a33b 100644 (file)
@@ -132,14 +132,14 @@ reset_set(void *data, u64 val)
        if (a5xx_gpu->pm4_bo) {
                if (a5xx_gpu->pm4_iova)
                        msm_gem_put_iova(a5xx_gpu->pm4_bo, gpu->aspace);
-               drm_gem_object_unreference(a5xx_gpu->pm4_bo);
+               drm_gem_object_put(a5xx_gpu->pm4_bo);
                a5xx_gpu->pm4_bo = NULL;
        }
 
        if (a5xx_gpu->pfp_bo) {
                if (a5xx_gpu->pfp_iova)
                        msm_gem_put_iova(a5xx_gpu->pfp_bo, gpu->aspace);
-               drm_gem_object_unreference(a5xx_gpu->pfp_bo);
+               drm_gem_object_put(a5xx_gpu->pfp_bo);
                a5xx_gpu->pfp_bo = NULL;
        }
 
index ab1d9308c31146d968c5b431587b895df9d517a8..6a6849309b6add0ff518c2011491901acefaf39e 100644 (file)
@@ -1234,7 +1234,7 @@ static void a5xx_crashdumper_free(struct msm_gpu *gpu,
        msm_gem_put_iova(dumper->bo, gpu->aspace);
        msm_gem_put_vaddr(dumper->bo);
 
-       drm_gem_object_unreference(dumper->bo);
+       drm_gem_object_put(dumper->bo);
 }
 
 static int a5xx_crashdumper_run(struct msm_gpu *gpu,
index e9c0e56dbec0934b7e272925d4aabf58ef7bad96..7a41e1c147e4208861076d1d6ab0ad9f1cff5a78 100644 (file)
@@ -323,7 +323,7 @@ err:
        if (a5xx_gpu->gpmu_iova)
                msm_gem_put_iova(a5xx_gpu->gpmu_bo, gpu->aspace);
        if (a5xx_gpu->gpmu_bo)
-               drm_gem_object_unreference(a5xx_gpu->gpmu_bo);
+               drm_gem_object_put(a5xx_gpu->gpmu_bo);
 
        a5xx_gpu->gpmu_bo = NULL;
        a5xx_gpu->gpmu_iova = 0;
index 6a3c560ba5c32a30f0ab45b350e1c0110ef32be8..4c357ead1be62956edf987080a40761e1f20d7b3 100644 (file)
@@ -276,7 +276,7 @@ void a5xx_preempt_fini(struct msm_gpu *gpu)
                if (a5xx_gpu->preempt_iova[i])
                        msm_gem_put_iova(a5xx_gpu->preempt_bo[i], gpu->aspace);
 
-               drm_gem_object_unreference(a5xx_gpu->preempt_bo[i]);
+               drm_gem_object_put(a5xx_gpu->preempt_bo[i]);
                a5xx_gpu->preempt_bo[i] = NULL;
        }
 }
index 9a14cb3d502709125a8edcd01f9ca0842887cf79..5f36b8d8824025a23e9fe81eae64e851b608aae3 100644 (file)
@@ -744,7 +744,7 @@ static void a6xx_destroy(struct msm_gpu *gpu)
        if (a6xx_gpu->sqe_bo) {
                if (a6xx_gpu->sqe_iova)
                        msm_gem_put_iova(a6xx_gpu->sqe_bo, gpu->aspace);
-               drm_gem_object_unreference_unlocked(a6xx_gpu->sqe_bo);
+               drm_gem_object_put_unlocked(a6xx_gpu->sqe_bo);
        }
 
        a6xx_gmu_remove(a6xx_gpu);
index 7bd83e0afa971e13de295e7595ac1abd0902c2a9..7a7923e6220da89b252997d9f9bb674e0b7802dd 100644 (file)
@@ -144,7 +144,7 @@ static int submit_lookup_objects(struct msm_gem_submit *submit,
                        goto out_unlock;
                }
 
-               drm_gem_object_reference(obj);
+               drm_gem_object_get(obj);
 
                submit->bos[i].obj = msm_obj;
 
@@ -396,7 +396,7 @@ static void submit_cleanup(struct msm_gem_submit *submit)
                struct msm_gem_object *msm_obj = submit->bos[i].obj;
                submit_unlock_unpin_bo(submit, i, false);
                list_del_init(&msm_obj->submit_entry);
-               drm_gem_object_unreference(&msm_obj->base);
+               drm_gem_object_put(&msm_obj->base);
        }
 
        ww_acquire_fini(&submit->ticket);