[PATCH] drm/amdgpu: save list length when fence is signaled
Deucher, Alexander
Alexander.Deucher at amd.com
Mon Aug 14 15:42:58 UTC 2017
> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Chunming Zhou
> Sent: Sunday, August 13, 2017 9:57 PM
> To: amd-gfx at lists.freedesktop.org
> Cc: Zhou, David(ChunMing)
> Subject: [PATCH] drm/amdgpu: save list length when fence is signaled
>
> Change-Id: I4cc1283f926a523ab57f5cb09f8b58906358b552
> Signed-off-by: Chunming Zhou <David1.Zhou at amd.com>
> Reviewed-by: Christian König <christian.koenig at amd.com>
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 13 ++++++-------
> 1 file 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 15f53234..287e59e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
> @@ -273,6 +273,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.
> @@ -285,13 +291,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;
> }
>
> --
> 1.9.1
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
More information about the amd-gfx
mailing list