diff options
author | Wang Hongcheng <Annie.Wang@amd.com> | 2017-11-16 21:39:02 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-11-21 10:45:05 -0500 |
commit | 446947b44fb8cabc0213ff4efd706931e36b1963 (patch) | |
tree | c9393a5df6184c72da1ec3c86131032e7c99eb8c | |
parent | d5a480b44b189bad1d67df5d4c5ed9e6c750e8f2 (diff) |
drm/amdgpu: fix rmmod KCQ disable failed error
If gfx_v8_0_hw_fini is called after amdgpu_ucode_fini_bo, we will
hit KCQ disabled failed. Let amdgpu_ucode_fini_bo run after
gfx_v8_0_hw_fini.
BUG: SWDEV-135547
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Wang Hongcheng <Annie.Wang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 3 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 |
3 files changed, 3 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index cbe5620654e7..2c85e0a98608 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |||
@@ -1836,6 +1836,9 @@ static int amdgpu_fini(struct amdgpu_device *adev) | |||
1836 | adev->ip_blocks[i].status.hw = false; | 1836 | adev->ip_blocks[i].status.hw = false; |
1837 | } | 1837 | } |
1838 | 1838 | ||
1839 | if (adev->firmware.load_type == AMDGPU_FW_LOAD_SMU) | ||
1840 | amdgpu_ucode_fini_bo(adev); | ||
1841 | |||
1839 | for (i = adev->num_ip_blocks - 1; i >= 0; i--) { | 1842 | for (i = adev->num_ip_blocks - 1; i >= 0; i--) { |
1840 | if (!adev->ip_blocks[i].status.sw) | 1843 | if (!adev->ip_blocks[i].status.sw) |
1841 | continue; | 1844 | continue; |
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c index 5f5aa5fddc16..033fba2def6f 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | |||
@@ -164,9 +164,6 @@ static int amdgpu_pp_hw_fini(void *handle) | |||
164 | ret = adev->powerplay.ip_funcs->hw_fini( | 164 | ret = adev->powerplay.ip_funcs->hw_fini( |
165 | adev->powerplay.pp_handle); | 165 | adev->powerplay.pp_handle); |
166 | 166 | ||
167 | if (adev->firmware.load_type == AMDGPU_FW_LOAD_SMU) | ||
168 | amdgpu_ucode_fini_bo(adev); | ||
169 | |||
170 | return ret; | 167 | return ret; |
171 | } | 168 | } |
172 | 169 | ||
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index 447d446b5015..7714f4a6c8b0 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | |||
@@ -442,8 +442,6 @@ static int psp_hw_fini(void *handle) | |||
442 | if (adev->firmware.load_type != AMDGPU_FW_LOAD_PSP) | 442 | if (adev->firmware.load_type != AMDGPU_FW_LOAD_PSP) |
443 | return 0; | 443 | return 0; |
444 | 444 | ||
445 | amdgpu_ucode_fini_bo(adev); | ||
446 | |||
447 | psp_ring_destroy(psp, PSP_RING_TYPE__KM); | 445 | psp_ring_destroy(psp, PSP_RING_TYPE__KM); |
448 | 446 | ||
449 | amdgpu_bo_free_kernel(&psp->tmr_bo, &psp->tmr_mc_addr, &psp->tmr_buf); | 447 | amdgpu_bo_free_kernel(&psp->tmr_bo, &psp->tmr_mc_addr, &psp->tmr_buf); |