[PATCH 1/1] drm/amdgpu: remove unnecessary checks

Christian König christian.koenig at amd.com
Tue Nov 2 07:36:46 UTC 2021


Am 22.10.21 um 13:03 schrieb Nirmoy Das:
> amdgpu_ttm_backend_bind() only needed for TTM_PL_TT
> and AMDGPU_PL_PREEMPT.
>
> Signed-off-by: Nirmoy Das <nirmoy.das at amd.com>

Acked-by: Christian König <christian.koenig at amd.com>

> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 5 -----
>   1 file changed, 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> index d784f8d3a834..eb872fc4ad92 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> @@ -914,11 +914,6 @@ static int amdgpu_ttm_backend_bind(struct ttm_device *bdev,
>   		     ttm->num_pages, bo_mem, ttm);
>   	}
>   
> -	if (bo_mem->mem_type == AMDGPU_PL_GDS ||
> -	    bo_mem->mem_type == AMDGPU_PL_GWS ||
> -	    bo_mem->mem_type == AMDGPU_PL_OA)
> -		return -EINVAL;
> -
>   	if (bo_mem->mem_type != TTM_PL_TT ||
>   	    !amdgpu_gtt_mgr_has_gart_addr(bo_mem)) {
>   		gtt->offset = AMDGPU_BO_INVALID_OFFSET;



More information about the amd-gfx mailing list