drm/amdgpu: minor cleanup for amdgpu_ttm_bind

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@amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Christian König 2017-10-16 13:47:15 +02:00 committed by Alex Deucher
parent 4694257e7d
commit ec8c9f8be8
1 changed files with 2 additions and 1 deletions

View File

@ -909,7 +909,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))