[PATCH 1/5] drm/amdgpu: minor cleanup for amdgpu_ttm_bind

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 20/10/17 11:20 AM, Christian König wrote:
> From: Christian König <christian.koenig at amd.com>
> 
> Filter the placement mask before using it. In theory it could be that we
> have other flags set here as well.
> 
> Signed-off-by: Christian König <christian.koenig at amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> index dcdfb8d176fc..32c822f3db11 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
> @@ -910,7 +910,8 @@ 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 = bo->mem.placement | TTM_PL_FLAG_TT;
> +	placements.flags = (bo->mem.placement & ~TTM_PL_MASK_MEM) |
> +		TTM_PL_FLAG_TT;
>  
>  	r = ttm_bo_mem_space(bo, &placement, &tmp, true, false);
>  	if (unlikely(r))
> 

Patches 1, 3 & 5 are

Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux