diff options
author | Dave Airlie <airlied@redhat.com> | 2017-08-18 05:45:03 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2017-08-18 05:45:03 +1000 |
commit | 28eb46287916f7f3ceec874959693e3fc49a294a (patch) | |
tree | fdbce10ee987b700ec3794141401ba823f7640d3 | |
parent | 41d31b5fd29bd768a7174b754249c97563c21fae (diff) | |
parent | 7a7c286d07f9c704e8fd11dd960bf421cc67b66b (diff) |
Merge branch 'drm-fixes-4.13' of git://people.freedesktop.org/~agd5f/linux into drm-fixesdrm-fixes-for-v4.13-rc6
single amdgpu fix.
* 'drm-fixes-4.13' of git://people.freedesktop.org/~agd5f/linux:
drm/amdgpu: save list length when fence is signaled
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c index a6899180b265..c586f44312f9 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c @@ -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; } |