diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c index de69ab12bb55..68af2f878bc9 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | |||
@@ -382,8 +382,7 @@ retry: | |||
382 | 382 | ||
383 | p->bytes_moved += ctx.bytes_moved; | 383 | p->bytes_moved += ctx.bytes_moved; |
384 | if (adev->gmc.visible_vram_size < adev->gmc.real_vram_size && | 384 | if (adev->gmc.visible_vram_size < adev->gmc.real_vram_size && |
385 | bo->tbo.mem.mem_type == TTM_PL_VRAM && | 385 | amdgpu_bo_in_cpu_visible_vram(bo)) |
386 | bo->tbo.mem.start < adev->gmc.visible_vram_size >> PAGE_SHIFT) | ||
387 | p->bytes_moved_vis += ctx.bytes_moved; | 386 | p->bytes_moved_vis += ctx.bytes_moved; |
388 | 387 | ||
389 | if (unlikely(r == -ENOMEM) && domain != bo->allowed_domains && | 388 | if (unlikely(r == -ENOMEM) && domain != bo->allowed_domains && |
@@ -437,8 +436,7 @@ static bool amdgpu_cs_try_evict(struct amdgpu_cs_parser *p, | |||
437 | /* Good we can try to move this BO somewhere else */ | 436 | /* Good we can try to move this BO somewhere else */ |
438 | update_bytes_moved_vis = | 437 | update_bytes_moved_vis = |
439 | adev->gmc.visible_vram_size < adev->gmc.real_vram_size && | 438 | adev->gmc.visible_vram_size < adev->gmc.real_vram_size && |
440 | bo->tbo.mem.mem_type == TTM_PL_VRAM && | 439 | amdgpu_bo_in_cpu_visible_vram(bo); |
441 | bo->tbo.mem.start < adev->gmc.visible_vram_size >> PAGE_SHIFT; | ||
442 | amdgpu_ttm_placement_from_domain(bo, other); | 440 | amdgpu_ttm_placement_from_domain(bo, other); |
443 | r = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx); | 441 | r = ttm_bo_validate(&bo->tbo, &bo->placement, &ctx); |
444 | p->bytes_moved += ctx.bytes_moved; | 442 | p->bytes_moved += ctx.bytes_moved; |