aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd
diff options
context:
space:
mode:
authorJunwei Zhang <Jerry.Zhang@amd.com>2015-09-06 01:55:03 -0400
committerAlex Deucher <alexander.deucher@amd.com>2015-10-21 11:35:13 -0400
commitce16b0e5a32a157abd6446214e8b91c55064204e (patch)
tree434296bf00671792802784696f7168b58602ccfa /drivers/gpu/drm/amd
parent0c418f10104d4aa1d6b83698790898dc9ef1c12d (diff)
drm/amdgpu: remove the unnecessary parameter adev for amdgpu_fence_wait_any()
Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu.h3
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c9
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c2
3 files changed, 4 insertions, 10 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index 39d96088f7b4..a9c0def6ce31 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -447,8 +447,7 @@ int amdgpu_fence_wait_next(struct amdgpu_ring *ring);
447int amdgpu_fence_wait_empty(struct amdgpu_ring *ring); 447int amdgpu_fence_wait_empty(struct amdgpu_ring *ring);
448unsigned amdgpu_fence_count_emitted(struct amdgpu_ring *ring); 448unsigned amdgpu_fence_count_emitted(struct amdgpu_ring *ring);
449 449
450signed long amdgpu_fence_wait_any(struct amdgpu_device *adev, 450signed long amdgpu_fence_wait_any(struct fence **array,
451 struct fence **array,
452 uint32_t count, 451 uint32_t count,
453 bool intr, 452 bool intr,
454 signed long t); 453 signed long t);
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
index 1fadc15e64ae..003a219943f1 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c
@@ -857,16 +857,12 @@ static void amdgpu_fence_wait_cb(struct fence *fence, struct fence_cb *cb)
857static signed long amdgpu_fence_default_wait(struct fence *f, bool intr, 857static signed long amdgpu_fence_default_wait(struct fence *f, bool intr,
858 signed long t) 858 signed long t)
859{ 859{
860 struct amdgpu_fence *fence = to_amdgpu_fence(f); 860 return amdgpu_fence_wait_any(&f, 1, intr, t);
861 struct amdgpu_device *adev = fence->ring->adev;
862
863 return amdgpu_fence_wait_any(adev, &f, 1, intr, t);
864} 861}
865 862
866/** 863/**
867 * Wait the fence array with timeout 864 * Wait the fence array with timeout
868 * 865 *
869 * @adev: amdgpu device
870 * @array: the fence array with amdgpu fence pointer 866 * @array: the fence array with amdgpu fence pointer
871 * @count: the number of the fence array 867 * @count: the number of the fence array
872 * @intr: when sleep, set the current task interruptable or not 868 * @intr: when sleep, set the current task interruptable or not
@@ -874,8 +870,7 @@ static signed long amdgpu_fence_default_wait(struct fence *f, bool intr,
874 * 870 *
875 * It will return when any fence is signaled or timeout. 871 * It will return when any fence is signaled or timeout.
876 */ 872 */
877signed long amdgpu_fence_wait_any(struct amdgpu_device *adev, 873signed long amdgpu_fence_wait_any(struct fence **array, uint32_t count,
878 struct fence **array, uint32_t count,
879 bool intr, signed long t) 874 bool intr, signed long t)
880{ 875{
881 struct amdgpu_wait_cb *cb; 876 struct amdgpu_wait_cb *cb;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c
index e90712443fe9..5cb27d525e43 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sa.c
@@ -372,7 +372,7 @@ int amdgpu_sa_bo_new(struct amdgpu_device *adev,
372 } while (amdgpu_sa_bo_next_hole(sa_manager, fences, tries)); 372 } while (amdgpu_sa_bo_next_hole(sa_manager, fences, tries));
373 373
374 spin_unlock(&sa_manager->wq.lock); 374 spin_unlock(&sa_manager->wq.lock);
375 t = amdgpu_fence_wait_any(adev, fences, AMDGPU_MAX_RINGS, 375 t = amdgpu_fence_wait_any(fences, AMDGPU_MAX_RINGS,
376 false, MAX_SCHEDULE_TIMEOUT); 376 false, MAX_SCHEDULE_TIMEOUT);
377 r = (t > 0) ? 0 : t; 377 r = (t > 0) ? 0 : t;
378 spin_lock(&sa_manager->wq.lock); 378 spin_lock(&sa_manager->wq.lock);