提交 07ae78c9 编写于 作者: A Alex Deucher

drm/radeon/cik: stop the sdma engines in the enable() function

We always stop the rings when disabling the engines so just
call the stop functions directly from the sdma enable function.
This way the rings' status is set correctly on suspend so
there are no problems on resume.  Fixes resume failures that
result in acceleration getting disabled.
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
上级 7b1bbe88
...@@ -293,6 +293,11 @@ void cik_sdma_enable(struct radeon_device *rdev, bool enable) ...@@ -293,6 +293,11 @@ void cik_sdma_enable(struct radeon_device *rdev, bool enable)
u32 me_cntl, reg_offset; u32 me_cntl, reg_offset;
int i; int i;
if (enable == false) {
cik_sdma_gfx_stop(rdev);
cik_sdma_rlc_stop(rdev);
}
for (i = 0; i < 2; i++) { for (i = 0; i < 2; i++) {
if (i == 0) if (i == 0)
reg_offset = SDMA0_REGISTER_OFFSET; reg_offset = SDMA0_REGISTER_OFFSET;
...@@ -422,10 +427,6 @@ static int cik_sdma_load_microcode(struct radeon_device *rdev) ...@@ -422,10 +427,6 @@ static int cik_sdma_load_microcode(struct radeon_device *rdev)
if (!rdev->sdma_fw) if (!rdev->sdma_fw)
return -EINVAL; return -EINVAL;
/* stop the gfx rings and rlc compute queues */
cik_sdma_gfx_stop(rdev);
cik_sdma_rlc_stop(rdev);
/* halt the MEs */ /* halt the MEs */
cik_sdma_enable(rdev, false); cik_sdma_enable(rdev, false);
...@@ -494,9 +495,6 @@ int cik_sdma_resume(struct radeon_device *rdev) ...@@ -494,9 +495,6 @@ int cik_sdma_resume(struct radeon_device *rdev)
*/ */
void cik_sdma_fini(struct radeon_device *rdev) void cik_sdma_fini(struct radeon_device *rdev)
{ {
/* stop the gfx rings and rlc compute queues */
cik_sdma_gfx_stop(rdev);
cik_sdma_rlc_stop(rdev);
/* halt the MEs */ /* halt the MEs */
cik_sdma_enable(rdev, false); cik_sdma_enable(rdev, false);
radeon_ring_fini(rdev, &rdev->ring[R600_RING_TYPE_DMA_INDEX]); radeon_ring_fini(rdev, &rdev->ring[R600_RING_TYPE_DMA_INDEX]);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册