summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorRex Zhu <Rex.Zhu@amd.com>2018-03-12 19:53:01 +0800
committerAlex Deucher <alexander.deucher@amd.com>2018-03-15 09:57:58 -0500
commit2dac5936e50084e42354c50b3d9723f5f0a2eb63 (patch)
treedb7ac9183157281bff4dd37d309c841da66b12ee /drivers/gpu/drm
parentb905090d2bae2e6189511714a7b88691b439c5a1 (diff)
drm/amdgpu: Call amdgpu_ucode_fini_bo in amd_powerplay.c
make it symmetric with amdgpu_ucode_init_bo in amd_powerplay.c refine the "commit b22558bb4ff8fc9fe925222f90297d7a03a5fb20" Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Evan Quan <evan.quan@amd.com> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_device.c3
-rw-r--r--drivers/gpu/drm/amd/powerplay/amd_powerplay.c8
2 files changed, 7 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 218f0efa39fb..690cf77b950e 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1489,9 +1489,6 @@ static int amdgpu_device_ip_fini(struct amdgpu_device *adev)
}
for (i = adev->num_ip_blocks - 1; i >= 0; i--) {
- if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_SMC &&
- adev->firmware.load_type == AMDGPU_FW_LOAD_SMU)
- amdgpu_ucode_fini_bo(adev);
if (!adev->ip_blocks[i].status.hw)
continue;
diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
index a5bc52cdc40d..3da3dccd13e2 100644
--- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
+++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
@@ -134,6 +134,10 @@ static int pp_sw_fini(void *handle)
if (hwmgr->smumgr_funcs->smu_fini != NULL)
hwmgr->smumgr_funcs->smu_fini(hwmgr);
}
+
+ if (adev->firmware.load_type == AMDGPU_FW_LOAD_SMU)
+ amdgpu_ucode_fini_bo(adev);
+
return 0;
}
@@ -201,7 +205,9 @@ static int pp_late_init(void *handle)
static void pp_late_fini(void *handle)
{
- amd_powerplay_destroy(handle);
+ struct amdgpu_device *adev = handle;
+
+ amd_powerplay_destroy(adev);
}