* [PATCH] drm/amdgpu: save list length when fence is signaled
@ 2017-08-14 1:57 Chunming Zhou
[not found] ` <1502675820-15781-1-git-send-email-David1.Zhou-5C7GfCeVMHo@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Chunming Zhou @ 2017-08-14 1:57 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Chunming Zhou
Change-Id: I4cc1283f926a523ab57f5cb09f8b58906358b552
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com>
Reviewed-by: Christian König <christian.koenig@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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: [PATCH] drm/amdgpu: save list length when fence is signaled
[not found] ` <1502675820-15781-1-git-send-email-David1.Zhou-5C7GfCeVMHo@public.gmane.org>
@ 2017-08-14 15:42 ` Deucher, Alexander
0 siblings, 0 replies; 2+ messages in thread
From: Deucher, Alexander @ 2017-08-14 15:42 UTC (permalink / raw)
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Zhou, David(ChunMing)
> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf
> Of Chunming Zhou
> Sent: Sunday, August 13, 2017 9:57 PM
> To: amd-gfx@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@amd.com>
> Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@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@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-14 15:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-14 1:57 [PATCH] drm/amdgpu: save list length when fence is signaled Chunming Zhou
[not found] ` <1502675820-15781-1-git-send-email-David1.Zhou-5C7GfCeVMHo@public.gmane.org>
2017-08-14 15:42 ` Deucher, Alexander
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.