dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: [PATCH 7/8] drm/amdgpu: always reserve one more shared slot for pipelined BO moves
Date: Thu,  4 Oct 2018 15:12:49 +0200	[thread overview]
Message-ID: <20181004131250.2373-7-christian.koenig@amd.com> (raw)
In-Reply-To: <20181004131250.2373-1-christian.koenig@amd.com>

This allows us to drop the extra reserve in TTM.

Signed-off-by: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 6 ++++--
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
index ba406bd1b08f..8edf75c76475 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
@@ -50,7 +50,8 @@ static int amdgpu_cs_user_fence_chunk(struct amdgpu_cs_parser *p,
 	bo = amdgpu_bo_ref(gem_to_amdgpu_bo(gobj));
 	p->uf_entry.priority = 0;
 	p->uf_entry.tv.bo = &bo->tbo;
-	p->uf_entry.tv.num_shared = 1;
+	/* One for TTM and one for the CS job */
+	p->uf_entry.tv.num_shared = 2;
 	p->uf_entry.user_pages = NULL;
 
 	drm_gem_object_put_unlocked(gobj);
@@ -598,8 +599,9 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p,
 			return r;
 	}
 
+	/* One for TTM and one for the CS job */
 	amdgpu_bo_list_for_each_entry(e, p->bo_list)
-		e->tv.num_shared = 1;
+		e->tv.num_shared = 2;
 
 	amdgpu_bo_list_get_list(p->bo_list, &p->validated);
 	if (p->bo_list->first_userptr != p->bo_list->num_entries)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 1b39b0144698..8c46acf893cc 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -616,8 +616,8 @@ void amdgpu_vm_get_pd_bo(struct amdgpu_vm *vm,
 {
 	entry->priority = 0;
 	entry->tv.bo = &vm->root.base.bo->tbo;
-	/* One for the VM updates and one for the CS job */
-	entry->tv.num_shared = 2;
+	/* One for the VM updates, one for TTM and one for the CS job */
+	entry->tv.num_shared = 3;
 	entry->user_pages = NULL;
 	list_add(&entry->tv.head, validated);
 }
-- 
2.14.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2018-10-04 13:12 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-04 13:12 [PATCH 1/8] dma-buf: remove shared fence staging in reservation object Christian König
     [not found] ` <20181004131250.2373-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2018-10-04 13:12   ` [PATCH 2/8] dma-buf: allow reserving more than one shared fence slot Christian König
2018-10-04 13:12   ` [PATCH 3/8] dma-buf: test shared slot allocation when mutex debugging is active Christian König
2018-10-04 13:12   ` [PATCH 5/8] drm/amdgpu: fix using shared fence for exported BOs v2 Christian König
     [not found]     ` <20181004131250.2373-5-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2018-10-23 13:40       ` Michel Dänzer
2018-10-04 13:12   ` [PATCH 6/8] drm/amdgpu: always reserve two slots for the VM Christian König
     [not found]     ` <20181004131250.2373-6-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2018-10-24  5:27       ` Zhang, Jerry(Junwei)
2018-10-04 13:12   ` [PATCH 8/8] drm/ttm: drop the extra reservation for pipelined BO moves Christian König
2018-10-12  8:22   ` [PATCH 1/8] dma-buf: remove shared fence staging in reservation object Christian König
     [not found]     ` <30ba1fc8-58d5-1c75-406e-d10e68ec4b18-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-10-23 12:20       ` Christian König
     [not found]         ` <42ee3d74-9dac-6573-448c-c70ea28cb9ff-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-10-23 13:40           ` Michel Dänzer
2018-10-24  5:12           ` Huang, Ray
2018-10-24 11:10           ` Huang, Ray
2018-10-24  5:25   ` Zhang, Jerry(Junwei)
2018-10-04 13:12 ` [PATCH 4/8] drm/ttm: allow reserving more than one shared slot v2 Christian König
2018-10-04 13:12 ` Christian König [this message]
2018-10-25 20:15 ` [PATCH 1/8] dma-buf: remove shared fence staging in reservation object Chris Wilson
2018-10-25 20:20   ` Chris Wilson
2018-10-25 21:21     ` Chris Wilson
2018-10-26  8:01       ` 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=20181004131250.2373-7-christian.koenig@amd.com \
    --to=ckoenig.leichtzumerken@gmail.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    /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