[PATCH] drm/amdgpu: fix amdgpu_vm_clear_freed

Deucher, Alexander Alexander.Deucher at amd.com
Wed Apr 19 16:21:34 UTC 2017


> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Christian König
> Sent: Wednesday, April 19, 2017 10:07 AM
> To: amd-gfx at lists.freedesktop.org
> Subject: [PATCH] drm/amdgpu: fix amdgpu_vm_clear_freed
> 
> From: Christian König <christian.koenig at amd.com>
> 
> Use amdgpu_vm_bo_update_mapping() instead of
> amdgpu_vm_bo_split_mapping() here.
> 
> We don't want any flags set in the cleared areas and splitting
> should be unnecessary.

I think you mean "shouldn't"?  With that fixed:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> 
> Signed-off-by: Christian König <christian.koenig at amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> index 9017b51..27af436 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
> @@ -1631,8 +1631,9 @@ int amdgpu_vm_clear_freed(struct
> amdgpu_device *adev,
>  			struct amdgpu_bo_va_mapping, list);
>  		list_del(&mapping->list);
> 
> -		r = amdgpu_vm_bo_split_mapping(adev, NULL, 0, NULL, vm,
> mapping,
> -					       0, 0, &f);
> +		r = amdgpu_vm_bo_update_mapping(adev, NULL, 0, NULL,
> vm,
> +						mapping->start, mapping-
> >last,
> +						0, 0, &f);
>  		amdgpu_vm_free_mapping(adev, vm, mapping, f);
>  		if (r) {
>  			fence_put(f);
> --
> 2.5.0
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list