AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: xinhui pan <xinhui.pan@amd.com>
To: amd-gfx@lists.freedesktop.org
Cc: "Alex Deucher" <alexander.deucher@amd.com>,
	"Felix Kuehling" <Felix.Kuehling@amd.com>,
	"xinhui pan" <xinhui.pan@amd.com>,
	"Christian König" <christian.koenig@amd.com>
Subject: [PATCH v4 1/2] drm_amdgpu: Add job fence to resv conditionally
Date: Sat, 14 Mar 2020 00:09:32 +0800	[thread overview]
Message-ID: <20200313160933.10394-2-xinhui.pan@amd.com> (raw)
In-Reply-To: <20200313160933.10394-1-xinhui.pan@amd.com>

Job fence on page table should be a shared one, so add it to the root
page talbe bo resv.

Cc: Christian König <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Felix Kuehling <Felix.Kuehling@amd.com>
Suggested-by: Christian König <christian.koenig@amd.com>
Signed-off-by: xinhui pan <xinhui.pan@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c | 4 +++-
 1 file changed, 3 insertions(+), 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 4cc7881f438c..c094654b233c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c
@@ -107,8 +107,10 @@ static int amdgpu_vm_sdma_commit(struct amdgpu_vm_update_params *p,
 	tmp = dma_fence_get(f);
 	if (p->direct)
 		swap(p->vm->last_direct, tmp);
-	else
+	else {
+		dma_resv_add_shared_fence(p->vm->root.base.bo->tbo.base.resv, tmp);
 		swap(p->vm->last_delayed, tmp);
+	}
 	dma_fence_put(tmp);
 
 	if (fence && !p->direct)
-- 
2.17.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  reply	other threads:[~2020-03-13 16:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-13 16:09 [PATCH v4 0/2] fix gmc page fault on navi1X xinhui pan
2020-03-13 16:09 ` xinhui pan [this message]
2020-03-13 16:09 ` [PATCH v4 2/2] drm/amdgpu: unref pt bo after job submit xinhui pan
2020-03-13 17:36   ` Felix Kuehling
2020-03-13 18:05     ` Christian König
2020-03-14 13:06       ` Pan, Xinhui
2020-03-16  8:15         ` Tao, Yintian
2020-03-16  9:51           ` Pan, Xinhui
2020-03-16  9:54             ` Tao, Yintian
2020-03-16 12:15           ` 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=20200313160933.10394-2-xinhui.pan@amd.com \
    --to=xinhui.pan@amd.com \
    --cc=Felix.Kuehling@amd.com \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox