diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2016-09-06 22:51:06 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2016-09-14 15:10:27 -0400 |
commit | e7b54945f5eb3394ec630e350b5faa686c6a0eb6 (patch) | |
tree | 983cbac54a8b172e09e30e44b63ef495b466b505 /drivers/gpu/drm/amd/amdgpu | |
parent | 8640faed5a8a8f55d6decd2d9c9f35ae687b1e4c (diff) |
drm/amdgpu/si: Call amdgpu_ttm_set_active_vram_size from si_dma_start/stop
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 <lakostis@altlinux.org>
Tested-by: Arek Ruśniak <arek.rusi@gmail.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')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/si_dma.c | 5 |
1 files changed, 5 insertions, 0 deletions
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) | |||
132 | rb_cntl &= ~DMA_RB_ENABLE; | 132 | rb_cntl &= ~DMA_RB_ENABLE; |
133 | WREG32(DMA_RB_CNTL + sdma_offsets[i], rb_cntl); | 133 | WREG32(DMA_RB_CNTL + sdma_offsets[i], rb_cntl); |
134 | 134 | ||
135 | if (adev->mman.buffer_funcs_ring == ring) | ||
136 | amdgpu_ttm_set_active_vram_size(adev, adev->mc.visible_vram_size); | ||
135 | ring->ready = false; | 137 | ring->ready = false; |
136 | } | 138 | } |
137 | } | 139 | } |
@@ -192,6 +194,9 @@ static int si_dma_start(struct amdgpu_device *adev) | |||
192 | ring->ready = false; | 194 | ring->ready = false; |
193 | return r; | 195 | return r; |
194 | } | 196 | } |
197 | |||
198 | if (adev->mman.buffer_funcs_ring == ring) | ||
199 | amdgpu_ttm_set_active_vram_size(adev, adev->mc.real_vram_size); | ||
195 | } | 200 | } |
196 | 201 | ||
197 | return 0; | 202 | return 0; |