From: "Zhang, Jerry(Junwei)" <Jerry.Zhang-5C7GfCeVMHo@public.gmane.org>
To: "Christian König"
<ckoenig.leichtzumerken-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH 6/8] drm/amdgpu: always reserve two slots for the VM
Date: Wed, 24 Oct 2018 13:27:34 +0800 [thread overview]
Message-ID: <b6591864-581a-acbe-c641-1eb590e1205a@amd.com> (raw)
In-Reply-To: <20181004131250.2373-6-christian.koenig-5C7GfCeVMHo@public.gmane.org>
On 10/4/18 9:12 PM, Christian König wrote:
> And drop the now superflous extra reservations.
>
> Signed-off-by: Christian König <christian.koenig@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 ----
> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 15 ++++++---------
> 2 files changed, 6 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> index b8de56d1a866..ba406bd1b08f 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
> @@ -964,10 +964,6 @@ static int amdgpu_cs_vm_handling(struct amdgpu_cs_parser *p)
> if (r)
> return r;
>
> - r = reservation_object_reserve_shared(vm->root.base.bo->tbo.resv, 1);
> - if (r)
> - return r;
> -
> p->job->vm_pd_addr = amdgpu_gmc_pd_addr(vm->root.base.bo);
>
> if (amdgpu_vm_debug) {
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index 218527bb0156..1b39b0144698 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -616,7 +616,8 @@ void amdgpu_vm_get_pd_bo(struct amdgpu_vm *vm,
> {
> entry->priority = 0;
> entry->tv.bo = &vm->root.base.bo->tbo;
> - entry->tv.num_shared = 1;
> + /* One for the VM updates and one for the CS job */
> + entry->tv.num_shared = 2;
> entry->user_pages = NULL;
> list_add(&entry->tv.head, validated);
> }
> @@ -772,10 +773,6 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev,
>
> ring = container_of(vm->entity.rq->sched, struct amdgpu_ring, sched);
>
> - r = reservation_object_reserve_shared(bo->tbo.resv, 1);
> - if (r)
> - return r;
> -
A trivial thing, this change may belong to next patch.
this patch looks dropping the resv for root bo.
Regards,
Jerry
> r = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
> if (r)
> goto error;
> @@ -1839,10 +1836,6 @@ static int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev,
> if (r)
> goto error_free;
>
> - r = reservation_object_reserve_shared(vm->root.base.bo->tbo.resv, 1);
> - if (r)
> - goto error_free;
> -
> r = amdgpu_vm_update_ptes(¶ms, start, last + 1, addr, flags);
> if (r)
> goto error_free;
> @@ -3023,6 +3016,10 @@ int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm,
> if (r)
> goto error_free_root;
>
> + r = reservation_object_reserve_shared(root->tbo.resv, 1);
> + if (r)
> + goto error_unreserve;
> +
> r = amdgpu_vm_clear_bo(adev, vm, root,
> adev->vm_manager.root_level,
> vm->pte_support_ats);
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2018-10-24 5:27 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
2018-10-04 13:12 ` [PATCH 4/8] drm/ttm: allow reserving more than one shared slot v2 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) [this message]
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 7/8] drm/amdgpu: always reserve one more shared slot for pipelined BO moves Christian König
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=b6591864-581a-acbe-c641-1eb590e1205a@amd.com \
--to=jerry.zhang-5c7gfcevmho@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=ckoenig.leichtzumerken-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.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