Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 02bc0650 authored by Christian König's avatar Christian König Committed by Alex Deucher
Browse files

drm/amdgpu: remove amdgpu_fence_wait



It was just a wrapper for fence_wait anyway.

Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 713293b8
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -439,7 +439,6 @@ int amdgpu_fence_wait_next(struct amdgpu_ring *ring);
int amdgpu_fence_wait_empty(struct amdgpu_ring *ring);
int amdgpu_fence_wait_empty(struct amdgpu_ring *ring);
unsigned amdgpu_fence_count_emitted(struct amdgpu_ring *ring);
unsigned amdgpu_fence_count_emitted(struct amdgpu_ring *ring);


int amdgpu_fence_wait(struct amdgpu_fence *fence, bool interruptible);
signed long amdgpu_fence_wait_any(struct amdgpu_device *adev,
signed long amdgpu_fence_wait_any(struct amdgpu_device *adev,
			  struct amdgpu_fence **fences,
			  struct amdgpu_fence **fences,
			  bool intr, long t);
			  bool intr, long t);
+1 −1
Original line number Original line Diff line number Diff line
@@ -42,7 +42,7 @@ static int amdgpu_benchmark_do_move(struct amdgpu_device *adev, unsigned size,
		r = amdgpu_copy_buffer(ring, saddr, daddr, size, NULL, &fence);
		r = amdgpu_copy_buffer(ring, saddr, daddr, size, NULL, &fence);
		if (r)
		if (r)
			goto exit_do_move;
			goto exit_do_move;
		r = amdgpu_fence_wait(fence, false);
		r = fence_wait(&fence->base, false);
		if (r)
		if (r)
			goto exit_do_move;
			goto exit_do_move;
		amdgpu_fence_unref(&fence);
		amdgpu_fence_unref(&fence);
+1 −1
Original line number Original line Diff line number Diff line
@@ -52,7 +52,7 @@ static void amdgpu_flip_work_func(struct work_struct *__work)
	if (work->fence) {
	if (work->fence) {
		fence = to_amdgpu_fence(work->fence);
		fence = to_amdgpu_fence(work->fence);
		if (fence) {
		if (fence) {
			r = amdgpu_fence_wait(fence, false);
			r = fence_wait(&fence->base, false);
			if (r == -EDEADLK) {
			if (r == -EDEADLK) {
				up_read(&adev->exclusive_lock);
				up_read(&adev->exclusive_lock);
				r = amdgpu_gpu_reset(adev);
				r = amdgpu_gpu_reset(adev);
+0 −22
Original line number Original line Diff line number Diff line
@@ -497,28 +497,6 @@ static long amdgpu_fence_ring_wait_seq_timeout(struct amdgpu_ring *ring, uint64_
	}
	}
}
}



/**
 * amdgpu_fence_wait - wait for a fence to signal
 *
 * @fence: amdgpu fence object
 * @intr: use interruptable sleep
 *
 * Wait for the requested fence to signal (all asics).
 * @intr selects whether to use interruptable (true) or non-interruptable
 * (false) sleep when waiting for the fence.
 * Returns 0 if the fence has passed, error for all other cases.
 */
int amdgpu_fence_wait(struct amdgpu_fence *fence, bool intr)
{
	long r;

	r = fence_wait_timeout(&fence->base, intr, MAX_SCHEDULE_TIMEOUT);
	if (r < 0)
		return  r;
	return 0;
}

/**
/**
 * amdgpu_fence_wait_next - wait for the next fence to signal
 * amdgpu_fence_wait_next - wait for the next fence to signal
 *
 *
+3 −3
Original line number Original line Diff line number Diff line
@@ -180,7 +180,7 @@ int amdgpu_sync_rings(struct amdgpu_sync *sync,


		if (amdgpu_enable_scheduler || (count >= AMDGPU_NUM_SYNCS)) {
		if (amdgpu_enable_scheduler || (count >= AMDGPU_NUM_SYNCS)) {
			/* not enough room, wait manually */
			/* not enough room, wait manually */
			r = amdgpu_fence_wait(fence, false);
			r = fence_wait(&fence->base, false);
			if (r)
			if (r)
				return r;
				return r;
			continue;
			continue;
@@ -200,7 +200,7 @@ int amdgpu_sync_rings(struct amdgpu_sync *sync,
		if (!amdgpu_semaphore_emit_signal(other, semaphore)) {
		if (!amdgpu_semaphore_emit_signal(other, semaphore)) {
			/* signaling wasn't successful wait manually */
			/* signaling wasn't successful wait manually */
			amdgpu_ring_undo(other);
			amdgpu_ring_undo(other);
			r = amdgpu_fence_wait(fence, false);
			r = fence_wait(&fence->base, false);
			if (r)
			if (r)
				return r;
				return r;
			continue;
			continue;
@@ -210,7 +210,7 @@ int amdgpu_sync_rings(struct amdgpu_sync *sync,
		if (!amdgpu_semaphore_emit_wait(ring, semaphore)) {
		if (!amdgpu_semaphore_emit_wait(ring, semaphore)) {
			/* waiting wasn't successful wait manually */
			/* waiting wasn't successful wait manually */
			amdgpu_ring_undo(other);
			amdgpu_ring_undo(other);
			r = amdgpu_fence_wait(fence, false);
			r = fence_wait(&fence->base, false);
			if (r)
			if (r)
				return r;
				return r;
			continue;
			continue;
Loading