diff options
author | Christian König <christian.koenig@amd.com> | 2018-09-11 03:30:46 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-09-19 13:38:17 -0400 |
commit | 4947b2f248f867626c7a3797fc3a314bd93aeac5 (patch) | |
tree | 0510c5993675825d020d2ea451afc23bdfdbc393 | |
parent | 3e14bedc581c3b7b05cd36352d0d47eca0317497 (diff) |
drm/amdgpu: stop pipelining VM PDs/PTs moves
We are going to need this for recoverable page fault handling and it
makes shadow handling during GPU reset much more easier.
Signed-off-by: Christian König <christian.koenig@amd.com>
Acked-by: Junwei Zhang <Jerry.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index c1387efc0c91..9436994bc406 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | |||
@@ -1366,7 +1366,7 @@ u64 amdgpu_bo_gpu_offset(struct amdgpu_bo *bo) | |||
1366 | { | 1366 | { |
1367 | WARN_ON_ONCE(bo->tbo.mem.mem_type == TTM_PL_SYSTEM); | 1367 | WARN_ON_ONCE(bo->tbo.mem.mem_type == TTM_PL_SYSTEM); |
1368 | WARN_ON_ONCE(!ww_mutex_is_locked(&bo->tbo.resv->lock) && | 1368 | WARN_ON_ONCE(!ww_mutex_is_locked(&bo->tbo.resv->lock) && |
1369 | !bo->pin_count); | 1369 | !bo->pin_count && bo->tbo.type != ttm_bo_type_kernel); |
1370 | WARN_ON_ONCE(bo->tbo.mem.start == AMDGPU_BO_INVALID_OFFSET); | 1370 | WARN_ON_ONCE(bo->tbo.mem.start == AMDGPU_BO_INVALID_OFFSET); |
1371 | WARN_ON_ONCE(bo->tbo.mem.mem_type == TTM_PL_VRAM && | 1371 | WARN_ON_ONCE(bo->tbo.mem.mem_type == TTM_PL_VRAM && |
1372 | !(bo->flags & AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS)); | 1372 | !(bo->flags & AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS)); |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c index 5da87ec67c64..d61910873627 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | |||
@@ -532,7 +532,11 @@ static int amdgpu_move_blit(struct ttm_buffer_object *bo, | |||
532 | if (r) | 532 | if (r) |
533 | goto error; | 533 | goto error; |
534 | 534 | ||
535 | r = ttm_bo_pipeline_move(bo, fence, evict, new_mem); | 535 | /* Always block for VM page tables before committing the new location */ |
536 | if (bo->type == ttm_bo_type_kernel) | ||
537 | r = ttm_bo_move_accel_cleanup(bo, fence, true, new_mem); | ||
538 | else | ||
539 | r = ttm_bo_pipeline_move(bo, fence, evict, new_mem); | ||
536 | dma_fence_put(fence); | 540 | dma_fence_put(fence); |
537 | return r; | 541 | return r; |
538 | 542 | ||