Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5bbc16cc authored by Monk Liu's avatar Monk Liu Committed by Alex Deucher
Browse files

drm/amdgpu: fix smu ucode memleak (v2)



Properly release the smu ucode in powerplay.

v2: agd: add polaris as well

Signed-off-by: default avatarMonk Liu <Monk.Liu@amd.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent a392746a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1014,6 +1014,8 @@ static int fiji_smu_fini(struct pp_smumgr *smumgr)
		kfree(smumgr->backend);
		smumgr->backend = NULL;
	}

	cgs_rel_firmware(smumgr->device, CGS_UCODE_ID_SMU);
	return 0;
}

+1 −0
Original line number Diff line number Diff line
@@ -469,6 +469,7 @@ int polaris10_smu_fini(struct pp_smumgr *smumgr)
		kfree(smumgr->backend);
		smumgr->backend = NULL;
	}
	cgs_rel_firmware(smumgr->device, CGS_UCODE_ID_SMU);
	return 0;
}

+2 −0
Original line number Diff line number Diff line
@@ -337,6 +337,8 @@ static int tonga_smu_fini(struct pp_smumgr *smumgr)
		kfree(smumgr->backend);
		smumgr->backend = NULL;
	}

	cgs_rel_firmware(smumgr->device, CGS_UCODE_ID_SMU);
	return 0;
}