diff options
author | Christian König <christian.koenig@amd.com> | 2017-09-01 03:22:56 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-09-01 12:50:45 -0400 |
commit | 70a9c6b9010848e101ff67a886f2e75209b2f0d1 (patch) | |
tree | c5f35c761075f1cb293ddf27957cc8bdef19e0ff /drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | |
parent | 481c2e94897eb74abcfb4a3cdb87f5f89499b93f (diff) |
drm/amdgpu: fix placement flags in amdgpu_ttm_bind
Otherwise we lose the NO_EVICT flag and can try to evict pinned BOs.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 6ea96e1fb273..841a5699bef0 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) | |||
819 | placement.busy_placement = &placements; | 819 | placement.busy_placement = &placements; |
820 | placements.fpfn = 0; | 820 | placements.fpfn = 0; |
821 | placements.lpfn = adev->mc.gart_size >> PAGE_SHIFT; | 821 | placements.lpfn = adev->mc.gart_size >> PAGE_SHIFT; |
822 | placements.flags = TTM_PL_MASK_CACHING | TTM_PL_FLAG_TT; | 822 | placements.flags = bo->mem.placement | TTM_PL_FLAG_TT; |
823 | 823 | ||
824 | r = ttm_bo_mem_space(bo, &placement, &tmp, true, false); | 824 | r = ttm_bo_mem_space(bo, &placement, &tmp, true, false); |
825 | if (unlikely(r)) | 825 | if (unlikely(r)) |