diff options
author | Jerome Glisse <jglisse@redhat.com> | 2013-01-02 17:30:35 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2013-01-03 13:18:41 -0500 |
commit | 64c56e8ce377842c8c8ff41054530480c7128c0b (patch) | |
tree | e72cf12a47e467ff5bf664d57698ba510e227c81 /drivers/gpu/drm/radeon/si.c | |
parent | eaaa6983ab2ccdf826c90838eb584211e0cadb76 (diff) |
drm/radeon: reset dma engine on gpu reset (v2)
This try to reset the dma engine when performing gpu reset. Hopefully
bringing back the gpu dma engine in sane state.
v2: agd5f: fix dma reset on cayman/TN, add support for SI
Signed-off-by: Jerome Glisse <jglisse@redhat.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 | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c index 74d38452c5c1..4bf17334927a 100644 --- a/drivers/gpu/drm/radeon/si.c +++ b/drivers/gpu/drm/radeon/si.c | |||
@@ -2129,7 +2129,7 @@ bool si_gpu_is_lockup(struct radeon_device *rdev, struct radeon_ring *ring) | |||
2129 | static int si_gpu_soft_reset(struct radeon_device *rdev) | 2129 | static int si_gpu_soft_reset(struct radeon_device *rdev) |
2130 | { | 2130 | { |
2131 | struct evergreen_mc_save save; | 2131 | struct evergreen_mc_save save; |
2132 | u32 grbm_reset = 0; | 2132 | u32 grbm_reset = 0, tmp; |
2133 | 2133 | ||
2134 | if (!(RREG32(GRBM_STATUS) & GUI_ACTIVE)) | 2134 | if (!(RREG32(GRBM_STATUS) & GUI_ACTIVE)) |
2135 | return 0; | 2135 | return 0; |
@@ -2159,6 +2159,22 @@ static int si_gpu_soft_reset(struct radeon_device *rdev) | |||
2159 | /* Disable CP parsing/prefetching */ | 2159 | /* Disable CP parsing/prefetching */ |
2160 | WREG32(CP_ME_CNTL, CP_ME_HALT | CP_PFP_HALT | CP_CE_HALT); | 2160 | WREG32(CP_ME_CNTL, CP_ME_HALT | CP_PFP_HALT | CP_CE_HALT); |
2161 | 2161 | ||
2162 | /* dma0 */ | ||
2163 | tmp = RREG32(DMA_RB_CNTL + DMA0_REGISTER_OFFSET); | ||
2164 | tmp &= ~DMA_RB_ENABLE; | ||
2165 | WREG32(DMA_RB_CNTL + DMA0_REGISTER_OFFSET, tmp); | ||
2166 | |||
2167 | /* dma1 */ | ||
2168 | tmp = RREG32(DMA_RB_CNTL + DMA1_REGISTER_OFFSET); | ||
2169 | tmp &= ~DMA_RB_ENABLE; | ||
2170 | WREG32(DMA_RB_CNTL + DMA1_REGISTER_OFFSET, tmp); | ||
2171 | |||
2172 | /* Reset dma */ | ||
2173 | WREG32(SRBM_SOFT_RESET, SOFT_RESET_DMA | SOFT_RESET_DMA1); | ||
2174 | RREG32(SRBM_SOFT_RESET); | ||
2175 | udelay(50); | ||
2176 | WREG32(SRBM_SOFT_RESET, 0); | ||
2177 | |||
2162 | /* reset all the gfx blocks */ | 2178 | /* reset all the gfx blocks */ |
2163 | grbm_reset = (SOFT_RESET_CP | | 2179 | grbm_reset = (SOFT_RESET_CP | |
2164 | SOFT_RESET_CB | | 2180 | SOFT_RESET_CB | |