drm/amdgpu: remove amdgpu_fence_signaled
authorChristian König <christian.koenig@amd.com>
Thu, 6 Aug 2015 15:49:25 +0000 (17:49 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 17 Aug 2015 20:51:08 +0000 (16:51 -0400)
The common kernel function does the same thing.

Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu.h
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c

index 2ba448ee948b5cc753f0a4f820baaeea80abce1a..abf1650f6936582c2fe8bcbfadc55dabd1112719 100644 (file)
@@ -439,7 +439,6 @@ int amdgpu_fence_wait_next(struct amdgpu_ring *ring);
 int amdgpu_fence_wait_empty(struct amdgpu_ring *ring);
 unsigned amdgpu_fence_count_emitted(struct amdgpu_ring *ring);
 
-bool amdgpu_fence_signaled(struct amdgpu_fence *fence);
 int amdgpu_fence_wait(struct amdgpu_fence *fence, bool interruptible);
 signed long amdgpu_fence_wait_any(struct amdgpu_device *adev,
                          struct amdgpu_fence **fences,
index eb419791d1b278a9e8b94392335a493d6cc26f75..5a2a15cf1a7c1ab65db1b560fbcbafb9841bde79 100644 (file)
@@ -425,28 +425,6 @@ static bool amdgpu_fence_enable_signaling(struct fence *f)
        return true;
 }
 
-/**
- * amdgpu_fence_signaled - check if a fence has signaled
- *
- * @fence: amdgpu fence object
- *
- * Check if the requested fence has signaled (all asics).
- * Returns true if the fence has signaled or false if it has not.
- */
-bool amdgpu_fence_signaled(struct amdgpu_fence *fence)
-{
-       if (!fence)
-               return true;
-
-       if (amdgpu_fence_seq_signaled(fence->ring, fence->seq)) {
-               if (!fence_signal(&fence->base))
-                       FENCE_TRACE(&fence->base, "signaled from amdgpu_fence_signaled\n");
-               return true;
-       }
-
-       return false;
-}
-
 /*
  * amdgpu_ring_wait_seq_timeout - wait for seq of the specific ring to signal
  * @ring: ring to wait on for the seq number
index f4e20eaede826743b388a3f6eebc7bc47570ea24..c5b17262529d45b37a0c3f5e34232416ba95b4b3 100644 (file)
@@ -160,7 +160,8 @@ static void amdgpu_sa_bo_try_free(struct amdgpu_sa_manager *sa_manager)
 
        sa_bo = list_entry(sa_manager->hole->next, struct amdgpu_sa_bo, olist);
        list_for_each_entry_safe_from(sa_bo, tmp, &sa_manager->olist, olist) {
-               if (sa_bo->fence == NULL || !amdgpu_fence_signaled(sa_bo->fence)) {
+               if (sa_bo->fence == NULL ||
+                   !fence_is_signaled(&sa_bo->fence->base)) {
                        return;
                }
                amdgpu_sa_bo_remove_locked(sa_bo);
@@ -274,7 +275,7 @@ static bool amdgpu_sa_bo_next_hole(struct amdgpu_sa_manager *sa_manager,
                sa_bo = list_first_entry(&sa_manager->flist[i],
                                         struct amdgpu_sa_bo, flist);
 
-               if (!amdgpu_fence_signaled(sa_bo->fence)) {
+               if (!fence_is_signaled(&sa_bo->fence->base)) {
                        fences[i] = sa_bo->fence;
                        continue;
                }
@@ -380,7 +381,7 @@ void amdgpu_sa_bo_free(struct amdgpu_device *adev, struct amdgpu_sa_bo **sa_bo,
 
        sa_manager = (*sa_bo)->manager;
        spin_lock(&sa_manager->wq.lock);
-       if (fence && !amdgpu_fence_signaled(fence)) {
+       if (fence && !fence_is_signaled(&fence->base)) {
                (*sa_bo)->fence = amdgpu_fence_ref(fence);
                list_add_tail(&(*sa_bo)->flist,
                              &sa_manager->flist[fence->ring->idx]);