aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLe Ma2023-05-31 16:08:50 +0800
committerAlex Deucher2023-06-09 12:39:41 -0400
commit09a77a40b51a979557521d5a2d39e431564d5d23 (patch)
treeb0e218416f16295d6f969658a8682d8c38a1efeb
parent25c30a12d718bd68ad91f58c7546eceaaf0feca5 (diff)
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: Le Ma <le.ma@amd.com> Reviewed-by: Shiwu Zhang <shiwu.zhang@amd.com> Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
index 2611241a5ff1..a92ea4601ea4 100644
--- a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
+++ b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c
@@ -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;
-
- /* On APUs, notify FW that the device is no longer driver managed */
- if (adev->flags & AMD_IS_APU) {
- if (!enable)
- smu_v13_0_6_notify_unload(smu);
+ int ret = 0;
- return 0;
+ 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);
}
- ret = smu_v13_0_system_features_control(smu, enable);
-
return ret;
}