提交 64f6db77 编写于 作者: R Rex Zhu 提交者: Alex Deucher

drm/amd/pp: Use release_firmware directly in powerplay

Use kernel api directly so we can deprecate the cgs interface.
Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: NRex Zhu <Rex.Zhu@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 8bb575a2
......@@ -25,6 +25,7 @@
#include <linux/kernel.h>
#include <linux/gfp.h>
#include <linux/slab.h>
#include <linux/firmware.h>
#include "amd_shared.h"
#include "amd_powerplay.h"
#include "power_state.h"
......@@ -107,8 +108,11 @@ static int pp_sw_fini(void *handle)
hwmgr_sw_fini(hwmgr);
if (adev->firmware.load_type == AMDGPU_FW_LOAD_SMU)
if (adev->firmware.load_type == AMDGPU_FW_LOAD_SMU) {
release_firmware(adev->pm.fw);
adev->pm.fw = NULL;
amdgpu_ucode_fini_bo(adev);
}
return 0;
}
......
......@@ -2784,7 +2784,6 @@ static int ci_smu_fini(struct pp_hwmgr *hwmgr)
{
kfree(hwmgr->smu_backend);
hwmgr->smu_backend = NULL;
cgs_rel_firmware(hwmgr->device, CGS_UCODE_ID_SMU);
return 0;
}
......
......@@ -650,6 +650,5 @@ int smu7_smu_fini(struct pp_hwmgr *hwmgr)
kfree(hwmgr->smu_backend);
hwmgr->smu_backend = NULL;
cgs_rel_firmware(hwmgr->device, CGS_UCODE_ID_SMU);
return 0;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册