aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
diff options
context:
space:
mode:
authorEvan Quan <evan.quan@amd.com>2020-06-01 14:03:57 +0800
committerAlex Deucher <alexander.deucher@amd.com>2020-07-01 01:59:17 -0400
commit6f47116e57d6288e64e4e7a40db537f0d423826d (patch)
treeea257396fa0064f8fc1720a5084ff336a108f974 /drivers/gpu/drm/amd/powerplay/smu_v11_0.c
parentdrm/amd/powerplay: move amdgpu_irq_src to the smu structure allocation (diff)
downloadlinux-dev-6f47116e57d6288e64e4e7a40db537f0d423826d.tar.xz
linux-dev-6f47116e57d6288e64e4e7a40db537f0d423826d.zip
drm/amd/powerplay: add firmware cleanup on sw_fini
To avoid possible memory leak. Signed-off-by: Evan Quan <evan.quan@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/powerplay/smu_v11_0.c')
-rw-r--r--drivers/gpu/drm/amd/powerplay/smu_v11_0.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
index caea6fbd0f0c..480fb74b9121 100644
--- a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
+++ b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c
@@ -199,6 +199,15 @@ out:
return err;
}
+void smu_v11_0_fini_microcode(struct smu_context *smu)
+{
+ struct amdgpu_device *adev = smu->adev;
+
+ release_firmware(adev->pm.fw);
+ adev->pm.fw = NULL;
+ adev->pm.fw_version = 0;
+}
+
int smu_v11_0_load_microcode(struct smu_context *smu)
{
struct amdgpu_device *adev = smu->adev;