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
Subject: Re: [PATCH] drm/amdgpu: Revert "kmap PDs/PTs in amdgpu_vm_update_directories"
Date: Thu, 30 Aug 2018 17:27:54 +0800 [thread overview]
Message-ID: <5B87B89A.9020906@amd.com> (raw)
In-Reply-To: <20180830075006.13403-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>
On 08/30/2018 03:50 PM, Christian König wrote:
> This reverts commit a7f91061c60ad9cac2e6a03b642be6a4f88b3662.
>
> Felix pointed out that we need to have the BOs mapped even before
> amdgpu_vm_update_directories is called.
>
> Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Junwei Zhang <Jerry.Zhang@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 13 ++++---------
> 1 file changed, 4 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index 33d9ce229f4a..72f8c750e128 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -343,7 +343,10 @@ int amdgpu_vm_validate_pt_bos(struct amdgpu_device *adev, struct amdgpu_vm *vm,
> list_move(&bo_base->vm_status, &vm->moved);
> spin_unlock(&vm->moved_lock);
> } else {
> - r = amdgpu_ttm_alloc_gart(&bo->tbo);
> + if (vm->use_cpu_for_update)
> + r = amdgpu_bo_kmap(bo, NULL);
> + else
> + r = amdgpu_ttm_alloc_gart(&bo->tbo);
> if (r)
> break;
> list_move(&bo_base->vm_status, &vm->relocated);
> @@ -1093,14 +1096,6 @@ int amdgpu_vm_update_directories(struct amdgpu_device *adev,
> params.adev = adev;
>
> if (vm->use_cpu_for_update) {
> - struct amdgpu_vm_bo_base *bo_base;
> -
> - list_for_each_entry(bo_base, &vm->relocated, vm_status) {
> - r = amdgpu_bo_kmap(bo_base->bo, NULL);
> - if (unlikely(r))
> - return r;
> - }
> -
> r = amdgpu_vm_wait_pd(adev, vm, AMDGPU_FENCE_OWNER_VM);
> if (unlikely(r))
> return r;
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
prev parent reply other threads:[~2018-08-30 9:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-30 7:50 [PATCH] drm/amdgpu: Revert "kmap PDs/PTs in amdgpu_vm_update_directories" Christian König
[not found] ` <20180830075006.13403-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2018-08-30 9:27 ` Zhang, Jerry (Junwei) [this message]
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=5B87B89A.9020906@amd.com \
--to=jerry.zhang-5c7gfcevmho@public.gmane.org \
--cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
--cc=ckoenig.leichtzumerken-Re5JQEeQqe8AvxtiuMwx3w@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 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.