[PATCH] drm/amdgpu: fix placement flags in amdgpu_ttm_bind

Deucher, Alexander Alexander.Deucher at amd.com
Fri Sep 1 14:58:19 UTC 2017


> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Christian König
> Sent: Friday, September 01, 2017 3:24 AM
> To: amd-gfx at lists.freedesktop.org
> Cc: Kuehling, Felix; Russell, Kent
> Subject: [PATCH] drm/amdgpu: fix placement flags in amdgpu_ttm_bind
> 
> From: Christian König <christian.koenig at amd.com>
> 
> Otherwise we lose the NO_EVICT flag and can try to evict pinned BOs.
> 
> Signed-off-by: Christian König <christian.koenig at amd.com>

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> index e9a0518..ac14c18 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> @@ -819,7 +819,7 @@ int amdgpu_ttm_bind(struct ttm_buffer_object *bo,
> struct ttm_mem_reg *bo_mem)
>  	placement.busy_placement = &placements;
>  	placements.fpfn = 0;
>  	placements.lpfn = adev->mc.gart_size >> PAGE_SHIFT;
> -	placements.flags = TTM_PL_MASK_CACHING | TTM_PL_FLAG_TT;
> +	placements.flags = bo->mem.placement | TTM_PL_FLAG_TT;
> 
>  	r = ttm_bo_mem_space(bo, &placement, &tmp, true, false);
>  	if (unlikely(r))
> --
> 2.7.4
> 
> _______________________________________________
> 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