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

Commit 28eb4628 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge branch 'drm-fixes-4.13' of git://people.freedesktop.org/~agd5f/linux into drm-fixes

single amdgpu fix.

* 'drm-fixes-4.13' of git://people.freedesktop.org/~agd5f/linux:
  drm/amdgpu: save list length when fence is signaled
parents 41d31b5f 7a7c286d
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -244,6 +244,12 @@ struct dma_fence *amdgpu_sync_peek_fence(struct amdgpu_sync *sync,
		struct dma_fence *f = e->fence;
		struct amd_sched_fence *s_fence = to_amd_sched_fence(f);

		if (dma_fence_is_signaled(f)) {
			hash_del(&e->node);
			dma_fence_put(f);
			kmem_cache_free(amdgpu_sync_slab, e);
			continue;
		}
		if (ring && s_fence) {
			/* For fences from the same ring it is sufficient
			 * when they are scheduled.
@@ -256,13 +262,6 @@ struct dma_fence *amdgpu_sync_peek_fence(struct amdgpu_sync *sync,
			}
		}

		if (dma_fence_is_signaled(f)) {
			hash_del(&e->node);
			dma_fence_put(f);
			kmem_cache_free(amdgpu_sync_slab, e);
			continue;
		}

		return f;
	}