diff options
author | Christian König <christian.koenig@amd.com> | 2018-09-14 20:44:17 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-09-19 12:36:03 -0500 |
commit | 3b2de69944cfac8bc8f43c81aeadcbefc31ed48e (patch) | |
tree | 0c85ccb828282242d1401b9c3ec10aeb90034281 /drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | |
parent | 0ee8685392a642ffb381d15d9fe4445d4ec03b56 (diff) | |
download | talos-obmc-linux-3b2de69944cfac8bc8f43c81aeadcbefc31ed48e.tar.gz talos-obmc-linux-3b2de69944cfac8bc8f43c81aeadcbefc31ed48e.zip |
drm/amdgpu: stop crashing on GDS/GWS/OA eviction
Simply ignore any copying here.
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 | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 1565344cc139..c81b35d06df1 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c @@ -256,6 +256,13 @@ static void amdgpu_evict_flags(struct ttm_buffer_object *bo, abo = ttm_to_amdgpu_bo(bo); switch (bo->mem.mem_type) { + case AMDGPU_PL_GDS: + case AMDGPU_PL_GWS: + case AMDGPU_PL_OA: + placement->num_placement = 0; + placement->num_busy_placement = 0; + return; + case TTM_PL_VRAM: if (!adev->mman.buffer_funcs_enabled) { /* Move to system memory */ @@ -283,6 +290,7 @@ static void amdgpu_evict_flags(struct ttm_buffer_object *bo, case TTM_PL_TT: default: amdgpu_bo_placement_from_domain(abo, AMDGPU_GEM_DOMAIN_CPU); + break; } *placement = abo->placement; } @@ -675,6 +683,16 @@ static int amdgpu_bo_move(struct ttm_buffer_object *bo, bool evict, amdgpu_move_null(bo, new_mem); return 0; } + if (old_mem->mem_type == AMDGPU_PL_GDS || + old_mem->mem_type == AMDGPU_PL_GWS || + old_mem->mem_type == AMDGPU_PL_OA || + new_mem->mem_type == AMDGPU_PL_GDS || + new_mem->mem_type == AMDGPU_PL_GWS || + new_mem->mem_type == AMDGPU_PL_OA) { + /* Nothing to save here */ + amdgpu_move_null(bo, new_mem); + return 0; + } if (!adev->mman.buffer_funcs_enabled) goto memcpy; |