AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Kuehling, Felix" <Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
To: "Christian König"
	<ckoenig.leichtzumerken-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	"amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Subject: Re: [PATCH 1/7] drm/amdgpu: clear PDs/PTs only after initializing them
Date: Wed, 20 Feb 2019 00:43:51 +0000	[thread overview]
Message-ID: <19e67fd8-a4c8-d90c-6848-2a3edf4ec0c9@amd.com> (raw)
In-Reply-To: <20190219134103.1531-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>

I commented on patches 2 and 3 in separate emails. The rest of the 
series is Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>


On 2019-02-19 8:40 a.m., Christian König wrote:
> Clear the VM PDs/PTs only after initializing all the structures.
>
> Signed-off-by: Christian König <christian.koenig@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 11 ++++++-----
>   1 file changed, 6 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index 942b5ebc6dc2..12d51d96491e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -945,10 +945,6 @@ int amdgpu_vm_alloc_pts(struct amdgpu_device *adev,
>   		if (r)
>   			return r;
>   
> -		r = amdgpu_vm_clear_bo(adev, vm, pt, cursor.level, ats);
> -		if (r)
> -			goto error_free_pt;
> -
>   		if (vm->use_cpu_for_update) {
>   			r = amdgpu_bo_kmap(pt, NULL);
>   			if (r)
> @@ -961,6 +957,10 @@ int amdgpu_vm_alloc_pts(struct amdgpu_device *adev,
>   		pt->parent = amdgpu_bo_ref(cursor.parent->base.bo);
>   
>   		amdgpu_vm_bo_base_init(&entry->base, vm, pt);
> +
> +		r = amdgpu_vm_clear_bo(adev, vm, pt, cursor.level, ats);
> +		if (r)
> +			goto error_free_pt;
>   	}
>   
>   	return 0;
> @@ -3031,13 +3031,14 @@ int amdgpu_vm_init(struct amdgpu_device *adev, struct amdgpu_vm *vm,
>   	if (r)
>   		goto error_unreserve;
>   
> +	amdgpu_vm_bo_base_init(&vm->root.base, vm, root);
> +
>   	r = amdgpu_vm_clear_bo(adev, vm, root,
>   			       adev->vm_manager.root_level,
>   			       vm->pte_support_ats);
>   	if (r)
>   		goto error_unreserve;
>   
> -	amdgpu_vm_bo_base_init(&vm->root.base, vm, root);
>   	amdgpu_bo_unreserve(vm->root.base.bo);
>   
>   	if (pasid) {
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

      parent reply	other threads:[~2019-02-20  0:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-19 13:40 [PATCH 1/7] drm/amdgpu: clear PDs/PTs only after initializing them Christian König
     [not found] ` <20190219134103.1531-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2019-02-19 13:40   ` [PATCH 2/7] drm/amdgpu: rework shadow handling during PD clear Christian König
     [not found]     ` <20190219134103.1531-2-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2019-02-20  0:07       ` Kuehling, Felix
2019-02-22 15:51       ` Zeng, Oak
     [not found]         ` <BL0PR12MB258008B300413D2A0052EE5F807F0-b4cIHhjg/p/XzH18dTCKOgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2019-02-22 16:34           ` Grodzovsky, Andrey
2019-02-19 13:40   ` [PATCH 3/7] drm/amdgpu: let amdgpu_vm_clear_bo figure out ats status Christian König
     [not found]     ` <20190219134103.1531-3-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2019-02-20  0:42       ` Kuehling, Felix
2019-02-19 13:41   ` [PATCH 4/7] drm/amdgpu: allocate VM PDs/PTs on demand Christian König
2019-02-19 13:41   ` [PATCH 5/7] drm/amdgpu: free " Christian König
2019-02-19 13:41   ` [PATCH 6/7] drm/amdgpu: drop the huge page flag Christian König
2019-02-19 13:41   ` [PATCH 7/7] drm/amdgpu: allow huge invalid mappings on GMC8 Christian König
2019-02-20  0:43   ` Kuehling, Felix [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=19e67fd8-a4c8-d90c-6848-2a3edf4ec0c9@amd.com \
    --to=felix.kuehling-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox