All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/amdgpu: release the VM shadow in the error path as well
@ 2018-02-02 20:17 Christian König
       [not found] ` <20180202201737.12266-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Christian König @ 2018-02-02 20:17 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

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

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 61cf93867b8e..b43098f02a40 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -411,6 +411,7 @@ static int amdgpu_vm_alloc_levels(struct amdgpu_device *adev,
 
 			r = amdgpu_vm_clear_bo(adev, vm, pt, level, ats);
 			if (r) {
+				amdgpu_bo_unref(&pt->shadow);
 				amdgpu_bo_unref(&pt);
 				return r;
 			}
@@ -418,6 +419,7 @@ static int amdgpu_vm_alloc_levels(struct amdgpu_device *adev,
 			if (vm->use_cpu_for_update) {
 				r = amdgpu_bo_kmap(pt, NULL);
 				if (r) {
+					amdgpu_bo_unref(&pt->shadow);
 					amdgpu_bo_unref(&pt);
 					return r;
 				}
-- 
2.14.1

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] drm/amdgpu: clear the shadow fence as well
       [not found] ` <20180202201737.12266-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>
@ 2018-02-02 20:17   ` Christian König
  2018-02-05  3:03   ` [PATCH 1/2] drm/amdgpu: release the VM shadow in the error path " Chunming Zhou
  1 sibling, 0 replies; 3+ messages in thread
From: Christian König @ 2018-02-02 20:17 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

It also needs to be initialized.

Signed-off-by: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index b43098f02a40..18ce47608bf1 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -336,6 +336,11 @@ static int amdgpu_vm_clear_bo(struct amdgpu_device *adev,
 
 	amdgpu_bo_fence(bo, fence, true);
 	dma_fence_put(fence);
+
+	if (bo->shadow)
+		return amdgpu_vm_clear_bo(adev, vm, bo->shadow,
+					  level, pte_support_ats);
+
 	return 0;
 
 error_free:
-- 
2.14.1

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/2] drm/amdgpu: release the VM shadow in the error path as well
       [not found] ` <20180202201737.12266-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>
  2018-02-02 20:17   ` [PATCH 2/2] drm/amdgpu: clear the shadow fence " Christian König
@ 2018-02-05  3:03   ` Chunming Zhou
  1 sibling, 0 replies; 3+ messages in thread
From: Chunming Zhou @ 2018-02-05  3:03 UTC (permalink / raw)
  To: Christian König, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

The series is Reviewed-by: Chunming Zhou <david1.zhou@amd.com>


On 2018年02月03日 04:17, Christian König wrote:
> Signed-off-by: Christian König <christian.koenig@amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index 61cf93867b8e..b43098f02a40 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -411,6 +411,7 @@ static int amdgpu_vm_alloc_levels(struct amdgpu_device *adev,
>   
>   			r = amdgpu_vm_clear_bo(adev, vm, pt, level, ats);
>   			if (r) {
> +				amdgpu_bo_unref(&pt->shadow);
>   				amdgpu_bo_unref(&pt);
>   				return r;
>   			}
> @@ -418,6 +419,7 @@ static int amdgpu_vm_alloc_levels(struct amdgpu_device *adev,
>   			if (vm->use_cpu_for_update) {
>   				r = amdgpu_bo_kmap(pt, NULL);
>   				if (r) {
> +					amdgpu_bo_unref(&pt->shadow);
>   					amdgpu_bo_unref(&pt);
>   					return r;
>   				}

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-02-05  3:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-02 20:17 [PATCH 1/2] drm/amdgpu: release the VM shadow in the error path as well Christian König
     [not found] ` <20180202201737.12266-1-christian.koenig-5C7GfCeVMHo@public.gmane.org>
2018-02-02 20:17   ` [PATCH 2/2] drm/amdgpu: clear the shadow fence " Christian König
2018-02-05  3:03   ` [PATCH 1/2] drm/amdgpu: release the VM shadow in the error path " Chunming Zhou

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.