aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd
diff options
context:
space:
mode:
authorRex Zhu <Rex.Zhu@amd.com>2018-03-12 07:53:01 -0400
committerAlex Deucher <alexander.deucher@amd.com>2018-03-15 10:57:58 -0400
commit2dac5936e50084e42354c50b3d9723f5f0a2eb63 (patch)
treedb7ac9183157281bff4dd37d309c841da66b12ee /drivers/gpu/drm/amd
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/amd')
-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)
1489 } 1489 }
1490 1490
1491 for (i = adev->num_ip_blocks - 1; i >= 0; i--) { 1491 for (i = adev->num_ip_blocks - 1; i >= 0; i--) {
1492 if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_SMC &&
1493 adev->firmware.load_type == AMDGPU_FW_LOAD_SMU)
1494 amdgpu_ucode_fini_bo(adev);
1495 if (!adev->ip_blocks[i].status.hw) 1492 if (!adev->ip_blocks[i].status.hw)
1496 continue; 1493 continue;
1497 1494
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)
134 if (hwmgr->smumgr_funcs->smu_fini != NULL) 134 if (hwmgr->smumgr_funcs->smu_fini != NULL)
135 hwmgr->smumgr_funcs->smu_fini(hwmgr); 135 hwmgr->smumgr_funcs->smu_fini(hwmgr);
136 } 136 }
137
138 if (adev->firmware.load_type == AMDGPU_FW_LOAD_SMU)
139 amdgpu_ucode_fini_bo(adev);
140
137 return 0; 141 return 0;
138} 142}
139 143
@@ -201,7 +205,9 @@ static int pp_late_init(void *handle)
201 205
202static void pp_late_fini(void *handle) 206static void pp_late_fini(void *handle)
203{ 207{
204 amd_powerplay_destroy(handle); 208 struct amdgpu_device *adev = handle;
209
210 amd_powerplay_destroy(adev);
205} 211}
206 212
207 213