diff options
author | Christian König <christian.koenig@amd.com> | 2017-10-16 07:47:15 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-10-25 23:09:39 -0400 |
commit | ec8c9f8be875c48c391a1355255867a2d70d1ee2 (patch) | |
tree | 230f1220586aac0a0c113a26a944bd441f7e834b | |
parent | 4694257e7d4757fedaa8dcd18bb5ff52e76a2765 (diff) |
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>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 51eacefadea1..b577b717caa0 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | |||
@@ -909,7 +909,8 @@ int amdgpu_ttm_bind(struct ttm_buffer_object *bo, struct ttm_mem_reg *bo_mem) | |||
909 | placement.busy_placement = &placements; | 909 | placement.busy_placement = &placements; |
910 | placements.fpfn = 0; | 910 | placements.fpfn = 0; |
911 | placements.lpfn = adev->mc.gart_size >> PAGE_SHIFT; | 911 | placements.lpfn = adev->mc.gart_size >> PAGE_SHIFT; |
912 | placements.flags = bo->mem.placement | TTM_PL_FLAG_TT; | 912 | placements.flags = (bo->mem.placement & ~TTM_PL_MASK_MEM) | |
913 | TTM_PL_FLAG_TT; | ||
913 | 914 | ||
914 | r = ttm_bo_mem_space(bo, &placement, &tmp, true, false); | 915 | r = ttm_bo_mem_space(bo, &placement, &tmp, true, false); |
915 | if (unlikely(r)) | 916 | if (unlikely(r)) |