aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/si.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2014-01-27 11:26:33 -0500
committerAlex Deucher <alexander.deucher@amd.com>2014-01-29 15:23:05 -0500
commit50efa51afddb50a6ab47ee15614fcf180130888c (patch)
tree5f80ce2157217fe83c3569a484e03c2e15f5e4d7 /drivers/gpu/drm/radeon/si.c
parentb9ace36f13c6fc46391c9d40edc648eef3a59ab0 (diff)
drm/radeon: clean up active vram sizing
If we are not able to properly initialize one of the gpu engines for buffer paging, we limit vram to the size of the cpu visible aperture. We generally either use the gfx or dma engine to do this. Clean up the size limiting code to only adjust the size based on what ring is selected for buffer paging rather than making assumptions about which engine is selected for paging. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/si.c')
-rw-r--r--drivers/gpu/drm/radeon/si.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c
index 07ce58716e44..e641725ae543 100644
--- a/drivers/gpu/drm/radeon/si.c
+++ b/drivers/gpu/drm/radeon/si.c
@@ -3249,7 +3249,8 @@ static void si_cp_enable(struct radeon_device *rdev, bool enable)
3249 if (enable) 3249 if (enable)
3250 WREG32(CP_ME_CNTL, 0); 3250 WREG32(CP_ME_CNTL, 0);
3251 else { 3251 else {
3252 radeon_ttm_set_active_vram_size(rdev, rdev->mc.visible_vram_size); 3252 if (rdev->asic->copy.copy_ring_index == RADEON_RING_TYPE_GFX_INDEX)
3253 radeon_ttm_set_active_vram_size(rdev, rdev->mc.visible_vram_size);
3253 WREG32(CP_ME_CNTL, (CP_ME_HALT | CP_PFP_HALT | CP_CE_HALT)); 3254 WREG32(CP_ME_CNTL, (CP_ME_HALT | CP_PFP_HALT | CP_CE_HALT));
3254 WREG32(SCRATCH_UMSK, 0); 3255 WREG32(SCRATCH_UMSK, 0);
3255 rdev->ring[RADEON_RING_TYPE_GFX_INDEX].ready = false; 3256 rdev->ring[RADEON_RING_TYPE_GFX_INDEX].ready = false;
@@ -3510,6 +3511,9 @@ static int si_cp_resume(struct radeon_device *rdev)
3510 3511
3511 si_enable_gui_idle_interrupt(rdev, true); 3512 si_enable_gui_idle_interrupt(rdev, true);
3512 3513
3514 if (rdev->asic->copy.copy_ring_index == RADEON_RING_TYPE_GFX_INDEX)
3515 radeon_ttm_set_active_vram_size(rdev, rdev->mc.real_vram_size);
3516
3513 return 0; 3517 return 0;
3514} 3518}
3515 3519