All of lore.kernel.org
 help / color / mirror / Atom feed
From: Philip Yang <Philip.Yang@amd.com>
To: <amd-gfx@lists.freedesktop.org>
Cc: Philip Yang <Philip.Yang@amd.com>,
	felix.kuehling@amd.com, christian.koenig@amd.com
Subject: [PATCH v2 2/3] drm/amdgpu: Add tlb_cb for unlocked update
Date: Mon, 28 Mar 2022 09:06:59 -0400	[thread overview]
Message-ID: <20220328130700.29642-2-Philip.Yang@amd.com> (raw)
In-Reply-To: <20220328130700.29642-1-Philip.Yang@amd.com>

Flush TLB needs wait for GPU update fence done. MMU notify callback to
unmap range from GPUs uses unlocked GPU page table update, so add tlb_cb
to unlocked update fence to increase vm->tlb_seq.

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

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 48f326609976..683b08f756ed 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -927,7 +927,7 @@ int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev,
 
 	r = vm->update_funcs->commit(&params, fence);
 
-	if (!unlocked && (!(flags & AMDGPU_PTE_VALID) || params.table_freed)) {
+	if (!(flags & AMDGPU_PTE_VALID) || params.table_freed) {
 		tlb_cb->vm = vm;
 		if (!fence || !*fence ||
 		    dma_fence_add_callback(*fence, &tlb_cb->cb,
-- 
2.35.1


  reply	other threads:[~2022-03-28 13:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-28 13:06 [PATCH v2 1/3] drm/amdgpu: Correct unlocked update fence handling Philip Yang
2022-03-28 13:06 ` Philip Yang [this message]
2022-03-28 13:14   ` [PATCH v2 2/3] drm/amdgpu: Add tlb_cb for unlocked update 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220328130700.29642-2-Philip.Yang@amd.com \
    --to=philip.yang@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=felix.kuehling@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.