All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/3] drm/amdgpu: Correct unlocked update fence handling
@ 2022-03-28 13:06 Philip Yang
  2022-03-28 13:06 ` [PATCH v2 2/3] drm/amdgpu: Add tlb_cb for unlocked update Philip Yang
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Philip Yang @ 2022-03-28 13:06 UTC (permalink / raw)
  To: amd-gfx; +Cc: Philip Yang, felix.kuehling, christian.koenig

To fix two issues with unlocked update fence:

1. vm->last_unlocked store the latest fence without taking refcount.
2. amdgpu_vm_bo_update_mapping returns old fence, not the latest fence.

Signed-off-by: Philip Yang <Philip.Yang@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c
index dbb551762805..69fba68ff88e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c
@@ -109,7 +109,7 @@ static int amdgpu_vm_sdma_commit(struct amdgpu_vm_update_params *p,
 	if (p->unlocked) {
 		struct dma_fence *tmp = dma_fence_get(f);
 
-		swap(p->vm->last_unlocked, f);
+		swap(p->vm->last_unlocked, tmp);
 		dma_fence_put(tmp);
 	} else {
 		amdgpu_bo_fence(p->vm->root.bo, f, true);
-- 
2.35.1


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

end of thread, other threads:[~2022-03-28 13:52 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-28 13:06 [PATCH v2 1/3] drm/amdgpu: Correct unlocked update fence handling Philip Yang
2022-03-28 13:06 ` [PATCH v2 2/3] drm/amdgpu: Add tlb_cb for unlocked update Philip Yang
2022-03-28 13:14   ` Christian König
2022-03-28 13:07 ` [PATCH v2 3/3] drm/amdkfd: Use atomic64_t type for pdd->tlb_seq Philip Yang
2022-03-28 13:16   ` Christian König
2022-03-28 13:14 ` [PATCH v2 1/3] drm/amdgpu: Correct unlocked update fence handling Christian König
2022-03-28 13:35   ` philip yang
2022-03-28 13:37     ` Christian König
2022-03-28 13:52 ` Christian König

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.