diff options
author | Christian König <christian.koenig@amd.com> | 2014-08-26 08:45:54 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2014-08-26 12:20:38 -0400 |
commit | 054e01d681b457ab50bdf1f22c0f0d1ad03afd70 (patch) | |
tree | bc43a50fe294caff637d3aef90dc4872904cb0dd /drivers/gpu/drm/radeon/si.c | |
parent | a284e9d14e35b776807c3a40dd1ff1e05429d4a4 (diff) |
drm/radeon: save/restore the PD addr on suspend/resume
This fixes a problem with GPU resets and TLB flushes on SI/CIK.
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/si.c')
-rw-r--r-- | drivers/gpu/drm/radeon/si.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c index a1274a31405c..739e0a5349f8 100644 --- a/drivers/gpu/drm/radeon/si.c +++ b/drivers/gpu/drm/radeon/si.c | |||
@@ -4290,10 +4290,10 @@ static int si_pcie_gart_enable(struct radeon_device *rdev) | |||
4290 | for (i = 1; i < 16; i++) { | 4290 | for (i = 1; i < 16; i++) { |
4291 | if (i < 8) | 4291 | if (i < 8) |
4292 | WREG32(VM_CONTEXT0_PAGE_TABLE_BASE_ADDR + (i << 2), | 4292 | WREG32(VM_CONTEXT0_PAGE_TABLE_BASE_ADDR + (i << 2), |
4293 | rdev->gart.table_addr >> 12); | 4293 | rdev->vm_manager.saved_table_addr[i]); |
4294 | else | 4294 | else |
4295 | WREG32(VM_CONTEXT8_PAGE_TABLE_BASE_ADDR + ((i - 8) << 2), | 4295 | WREG32(VM_CONTEXT8_PAGE_TABLE_BASE_ADDR + ((i - 8) << 2), |
4296 | rdev->gart.table_addr >> 12); | 4296 | rdev->vm_manager.saved_table_addr[i]); |
4297 | } | 4297 | } |
4298 | 4298 | ||
4299 | /* enable context1-15 */ | 4299 | /* enable context1-15 */ |
@@ -4325,6 +4325,17 @@ static int si_pcie_gart_enable(struct radeon_device *rdev) | |||
4325 | 4325 | ||
4326 | static void si_pcie_gart_disable(struct radeon_device *rdev) | 4326 | static void si_pcie_gart_disable(struct radeon_device *rdev) |
4327 | { | 4327 | { |
4328 | unsigned i; | ||
4329 | |||
4330 | for (i = 1; i < 16; ++i) { | ||
4331 | uint32_t reg; | ||
4332 | if (i < 8) | ||
4333 | reg = VM_CONTEXT0_PAGE_TABLE_BASE_ADDR + (i << 2); | ||
4334 | else | ||
4335 | reg = VM_CONTEXT8_PAGE_TABLE_BASE_ADDR + ((i - 8) << 2); | ||
4336 | rdev->vm_manager.saved_table_addr[i] = RREG32(reg); | ||
4337 | } | ||
4338 | |||
4328 | /* Disable all tables */ | 4339 | /* Disable all tables */ |
4329 | WREG32(VM_CONTEXT0_CNTL, 0); | 4340 | WREG32(VM_CONTEXT0_CNTL, 0); |
4330 | WREG32(VM_CONTEXT1_CNTL, 0); | 4341 | WREG32(VM_CONTEXT1_CNTL, 0); |