diff options
| -rw-r--r-- | drivers/gpu/drm/radeon/cik_sdma.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/gpu/drm/radeon/cik_sdma.c b/drivers/gpu/drm/radeon/cik_sdma.c index 5d7a5fa3741a..94626ea90fa5 100644 --- a/drivers/gpu/drm/radeon/cik_sdma.c +++ b/drivers/gpu/drm/radeon/cik_sdma.c | |||
| @@ -293,6 +293,11 @@ void cik_sdma_enable(struct radeon_device *rdev, bool enable) | |||
| 293 | u32 me_cntl, reg_offset; | 293 | u32 me_cntl, reg_offset; |
| 294 | int i; | 294 | int i; |
| 295 | 295 | ||
| 296 | if (enable == false) { | ||
| 297 | cik_sdma_gfx_stop(rdev); | ||
| 298 | cik_sdma_rlc_stop(rdev); | ||
| 299 | } | ||
| 300 | |||
| 296 | for (i = 0; i < 2; i++) { | 301 | for (i = 0; i < 2; i++) { |
| 297 | if (i == 0) | 302 | if (i == 0) |
| 298 | reg_offset = SDMA0_REGISTER_OFFSET; | 303 | reg_offset = SDMA0_REGISTER_OFFSET; |
| @@ -422,10 +427,6 @@ static int cik_sdma_load_microcode(struct radeon_device *rdev) | |||
| 422 | if (!rdev->sdma_fw) | 427 | if (!rdev->sdma_fw) |
| 423 | return -EINVAL; | 428 | return -EINVAL; |
| 424 | 429 | ||
| 425 | /* stop the gfx rings and rlc compute queues */ | ||
| 426 | cik_sdma_gfx_stop(rdev); | ||
| 427 | cik_sdma_rlc_stop(rdev); | ||
| 428 | |||
| 429 | /* halt the MEs */ | 430 | /* halt the MEs */ |
| 430 | cik_sdma_enable(rdev, false); | 431 | cik_sdma_enable(rdev, false); |
| 431 | 432 | ||
| @@ -494,9 +495,6 @@ int cik_sdma_resume(struct radeon_device *rdev) | |||
| 494 | */ | 495 | */ |
| 495 | void cik_sdma_fini(struct radeon_device *rdev) | 496 | void cik_sdma_fini(struct radeon_device *rdev) |
| 496 | { | 497 | { |
| 497 | /* stop the gfx rings and rlc compute queues */ | ||
| 498 | cik_sdma_gfx_stop(rdev); | ||
| 499 | cik_sdma_rlc_stop(rdev); | ||
| 500 | /* halt the MEs */ | 498 | /* halt the MEs */ |
| 501 | cik_sdma_enable(rdev, false); | 499 | cik_sdma_enable(rdev, false); |
| 502 | radeon_ring_fini(rdev, &rdev->ring[R600_RING_TYPE_DMA_INDEX]); | 500 | radeon_ring_fini(rdev, &rdev->ring[R600_RING_TYPE_DMA_INDEX]); |
