diff options
author | Rex Zhu <Rex.Zhu@amd.com> | 2018-03-22 07:32:45 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-04-11 14:07:49 -0400 |
commit | 64f6db77fcb81493988061587fa478e6612dc45b (patch) | |
tree | 8784474ee9f8724442bea696cf6852090c418b90 /drivers/gpu/drm/amd | |
parent | 8bb575a2d83af097980641d864401b303286755c (diff) |
drm/amd/pp: Use release_firmware directly in powerplay
Use kernel api directly so we can deprecate the cgs interface.
Reviewed-by: Alex Deucher <alexander.deucher@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/powerplay/amd_powerplay.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c | 1 |
3 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c index 337af789d258..b91ef113a490 100644 --- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c +++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
26 | #include <linux/gfp.h> | 26 | #include <linux/gfp.h> |
27 | #include <linux/slab.h> | 27 | #include <linux/slab.h> |
28 | #include <linux/firmware.h> | ||
28 | #include "amd_shared.h" | 29 | #include "amd_shared.h" |
29 | #include "amd_powerplay.h" | 30 | #include "amd_powerplay.h" |
30 | #include "power_state.h" | 31 | #include "power_state.h" |
@@ -107,8 +108,11 @@ static int pp_sw_fini(void *handle) | |||
107 | 108 | ||
108 | hwmgr_sw_fini(hwmgr); | 109 | hwmgr_sw_fini(hwmgr); |
109 | 110 | ||
110 | if (adev->firmware.load_type == AMDGPU_FW_LOAD_SMU) | 111 | if (adev->firmware.load_type == AMDGPU_FW_LOAD_SMU) { |
112 | release_firmware(adev->pm.fw); | ||
113 | adev->pm.fw = NULL; | ||
111 | amdgpu_ucode_fini_bo(adev); | 114 | amdgpu_ucode_fini_bo(adev); |
115 | } | ||
112 | 116 | ||
113 | return 0; | 117 | return 0; |
114 | } | 118 | } |
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c index 08d000140eca..e30a2eea1fba 100644 --- a/drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c +++ b/drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c | |||
@@ -2784,7 +2784,6 @@ static int ci_smu_fini(struct pp_hwmgr *hwmgr) | |||
2784 | { | 2784 | { |
2785 | kfree(hwmgr->smu_backend); | 2785 | kfree(hwmgr->smu_backend); |
2786 | hwmgr->smu_backend = NULL; | 2786 | hwmgr->smu_backend = NULL; |
2787 | cgs_rel_firmware(hwmgr->device, CGS_UCODE_ID_SMU); | ||
2788 | return 0; | 2787 | return 0; |
2789 | } | 2788 | } |
2790 | 2789 | ||
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c index 3684822b75b2..41fab2df994e 100644 --- a/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c +++ b/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c | |||
@@ -650,6 +650,5 @@ int smu7_smu_fini(struct pp_hwmgr *hwmgr) | |||
650 | 650 | ||
651 | kfree(hwmgr->smu_backend); | 651 | kfree(hwmgr->smu_backend); |
652 | hwmgr->smu_backend = NULL; | 652 | hwmgr->smu_backend = NULL; |
653 | cgs_rel_firmware(hwmgr->device, CGS_UCODE_ID_SMU); | ||
654 | return 0; | 653 | return 0; |
655 | } | 654 | } |