[PATCH 1/1] drm/amdkfd: use allowed domain for vmbo validation

Christian König christian.koenig at amd.com
Tue Jun 8 09:37:02 UTC 2021


Am 08.06.21 um 11:32 schrieb Nirmoy Das:
> Remove fixed domain and use BO's allowed domain for PT/PD
> BO validation.

"Fixes handling when page tables are in system memory".

And I think you can now remove the validate structure as well.

Christian.

>
> Signed-off-by: Nirmoy Das <nirmoy.das at amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
> index d6cb7cf76623..a45eadfbf417 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
> @@ -336,7 +336,7 @@ static int amdgpu_amdkfd_bo_validate(struct amdgpu_bo *bo, uint32_t domain,
>   		 "Called with userptr BO"))
>   		return -EINVAL;
>   
> -	amdgpu_bo_placement_from_domain(bo, domain);
> +	amdgpu_bo_placement_from_domain(bo, bo->allowed_domains);
>   
>   	ret = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx);
>   	if (ret)
> @@ -369,7 +369,6 @@ static int vm_validate_pt_pd_bos(struct amdgpu_vm *vm)
>   	struct amdgpu_vm_parser param;
>   	int ret;
>   
> -	param.domain = AMDGPU_GEM_DOMAIN_VRAM;
>   	param.wait = false;
>   
>   	ret = amdgpu_vm_validate_pt_bos(adev, vm, amdgpu_amdkfd_validate,



More information about the amd-gfx mailing list