Commit 09a77a40 authored by Le Ma's avatar Le Ma Committed by Alex Deucher
Browse files

drm/amdgpu/pm: notify driver unloading to PMFW for SMU v13.0.6 dGPU



Per requested, follow the same sequence as APU to send only
PPSMC_MSG_PrepareForDriverUnload to PMFW during driver unloading.

Signed-off-by: default avatarLe Ma <le.ma@amd.com>
Reviewed-by: default avatarShiwu Zhang <shiwu.zhang@amd.com>
Reviewed-by: default avatarLijo Lazar <lijo.lazar@amd.com>
Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 25c30a12
Loading
Loading
Loading
Loading
+7 −9
Original line number Diff line number Diff line
@@ -1413,18 +1413,16 @@ static int smu_v13_0_6_system_features_control(struct smu_context *smu,
					       bool enable)
{
	struct amdgpu_device *adev = smu->adev;
	int ret;
	int ret = 0;

	/* On APUs, notify FW that the device is no longer driver managed */
	if (adev->flags & AMD_IS_APU) {
		if (!enable)
	if (enable) {
		if (!(adev->flags & AMD_IS_APU))
			ret = smu_v13_0_system_features_control(smu, enable);
	} else {
		/* Notify FW that the device is no longer driver managed */
		smu_v13_0_6_notify_unload(smu);

		return 0;
	}

	ret = smu_v13_0_system_features_control(smu, enable);

	return ret;
}