AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 1/5] drm/amdgpu: promote the implicit sync to the dependent read fences
@ 2025-04-30  2:40 Prike Liang
  2025-04-30  2:40 ` [PATCH v3 2/5] drm/amdgpu: don't sync the user queue eviction fence Prike Liang
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Prike Liang @ 2025-04-30  2:40 UTC (permalink / raw)
  To: amd-gfx; +Cc: Alexander.Deucher, Christian.Koenig, Prike Liang

The driver doesn't want to implicitly sync on the DMA_RESV_USAGE_BOOKKEEP
usage fences, and the BOOKEEP fences should be synced explicitly. So, as
the VM implicit syncing only need to return and sync the dependent read
fences.

Signed-off-by: Prike Liang <Prike.Liang@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
index 5576ed0b508f..d6ae9974c952 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c
@@ -249,9 +249,8 @@ int amdgpu_sync_resv(struct amdgpu_device *adev, struct amdgpu_sync *sync,
 
 	if (resv == NULL)
 		return -EINVAL;
-
-	/* TODO: Use DMA_RESV_USAGE_READ here */
-	dma_resv_for_each_fence(&cursor, resv, DMA_RESV_USAGE_BOOKKEEP, f) {
+	/* Implicitly sync only to KERNEL, WRITE and READ */
+	dma_resv_for_each_fence(&cursor, resv, DMA_RESV_USAGE_READ, f) {
 		dma_fence_chain_for_each(f, f) {
 			struct dma_fence *tmp = dma_fence_chain_contained(f);
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2025-05-08  9:40 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-30  2:40 [PATCH v3 1/5] drm/amdgpu: promote the implicit sync to the dependent read fences Prike Liang
2025-04-30  2:40 ` [PATCH v3 2/5] drm/amdgpu: don't sync the user queue eviction fence Prike Liang
2025-04-30 11:56   ` Christian König
2025-05-06  2:09     ` Liang, Prike
2025-05-06  8:23       ` Christian König
2025-05-06  8:59         ` Liang, Prike
2025-04-30  2:40 ` [PATCH v3 3/5] drm/amdgpu: fix the eviction fence dereference Prike Liang
2025-04-30 11:58   ` Christian König
2025-05-06  2:19     ` Liang, Prike
2025-04-30  2:40 ` [PATCH v3 4/5] drm/amdgpu: validate the eviction fence before attaching/detaching Prike Liang
2025-04-30 12:01   ` Christian König
2025-05-06  8:22     ` Liang, Prike
2025-05-06  8:38       ` Christian König
2025-05-08  7:08         ` Liang, Prike
2025-05-08  9:40           ` Christian König
2025-04-30  2:40 ` [PATCH v3 5/5] drm/amdgpu: lock the eviction fence before signaling it Prike Liang
2025-04-30 12:03   ` Christian König

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox