aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/cik_sdma.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/radeon/cik_sdma.c')
-rw-r--r--drivers/gpu/drm/radeon/cik_sdma.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpu/drm/radeon/cik_sdma.c b/drivers/gpu/drm/radeon/cik_sdma.c
index 00150ac49cd2..89b4afa5041c 100644
--- a/drivers/gpu/drm/radeon/cik_sdma.c
+++ b/drivers/gpu/drm/radeon/cik_sdma.c
@@ -264,6 +264,8 @@ static void cik_sdma_gfx_stop(struct radeon_device *rdev)
264 WREG32(SDMA0_GFX_RB_CNTL + reg_offset, rb_cntl); 264 WREG32(SDMA0_GFX_RB_CNTL + reg_offset, rb_cntl);
265 WREG32(SDMA0_GFX_IB_CNTL + reg_offset, 0); 265 WREG32(SDMA0_GFX_IB_CNTL + reg_offset, 0);
266 } 266 }
267 rdev->ring[R600_RING_TYPE_DMA_INDEX].ready = false;
268 rdev->ring[CAYMAN_RING_TYPE_DMA1_INDEX].ready = false;
267} 269}
268 270
269/** 271/**
@@ -291,6 +293,11 @@ void cik_sdma_enable(struct radeon_device *rdev, bool enable)
291 u32 me_cntl, reg_offset; 293 u32 me_cntl, reg_offset;
292 int i; 294 int i;
293 295
296 if (enable == false) {
297 cik_sdma_gfx_stop(rdev);
298 cik_sdma_rlc_stop(rdev);
299 }
300
294 for (i = 0; i < 2; i++) { 301 for (i = 0; i < 2; i++) {
295 if (i == 0) 302 if (i == 0)
296 reg_offset = SDMA0_REGISTER_OFFSET; 303 reg_offset = SDMA0_REGISTER_OFFSET;
@@ -418,10 +425,6 @@ static int cik_sdma_load_microcode(struct radeon_device *rdev)
418 if (!rdev->sdma_fw) 425 if (!rdev->sdma_fw)
419 return -EINVAL; 426 return -EINVAL;
420 427
421 /* stop the gfx rings and rlc compute queues */
422 cik_sdma_gfx_stop(rdev);
423 cik_sdma_rlc_stop(rdev);
424
425 /* halt the MEs */ 428 /* halt the MEs */
426 cik_sdma_enable(rdev, false); 429 cik_sdma_enable(rdev, false);
427 430
@@ -490,9 +493,6 @@ int cik_sdma_resume(struct radeon_device *rdev)
490 */ 493 */
491void cik_sdma_fini(struct radeon_device *rdev) 494void cik_sdma_fini(struct radeon_device *rdev)
492{ 495{
493 /* stop the gfx rings and rlc compute queues */
494 cik_sdma_gfx_stop(rdev);
495 cik_sdma_rlc_stop(rdev);
496 /* halt the MEs */ 496 /* halt the MEs */
497 cik_sdma_enable(rdev, false); 497 cik_sdma_enable(rdev, false);
498 radeon_ring_fini(rdev, &rdev->ring[R600_RING_TYPE_DMA_INDEX]); 498 radeon_ring_fini(rdev, &rdev->ring[R600_RING_TYPE_DMA_INDEX]);