From e7b54945f5eb3394ec630e350b5faa686c6a0eb6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michel=20D=C3=A4nzer?= Date: Wed, 7 Sep 2016 11:51:06 +0900 Subject: [PATCH] drm/amdgpu/si: Call amdgpu_ttm_set_active_vram_size from si_dma_start/stop MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Without this, we were only ever using the first 256MB of VRAM. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97593 Tested-by: Konstantin A. Lepikhov Tested-by: Arek Ruśniak Reviewed-by: Alex Deucher Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/si_dma.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/si_dma.c b/drivers/gpu/drm/amd/amdgpu/si_dma.c index 2abdaa681797..4cbd4086ee7d 100644 --- a/drivers/gpu/drm/amd/amdgpu/si_dma.c +++ b/drivers/gpu/drm/amd/amdgpu/si_dma.c @@ -132,6 +132,8 @@ static void si_dma_stop(struct amdgpu_device *adev) rb_cntl &= ~DMA_RB_ENABLE; WREG32(DMA_RB_CNTL + sdma_offsets[i], rb_cntl); + if (adev->mman.buffer_funcs_ring == ring) + amdgpu_ttm_set_active_vram_size(adev, adev->mc.visible_vram_size); ring->ready = false; } } @@ -192,6 +194,9 @@ static int si_dma_start(struct amdgpu_device *adev) ring->ready = false; return r; } + + if (adev->mman.buffer_funcs_ring == ring) + amdgpu_ttm_set_active_vram_size(adev, adev->mc.real_vram_size); } return 0; -- 2.20.1