Skip to contentSkip to conversation

drm/amdgpu: Fix kernel oops in amdgpu_dpm_switch_power_profile

PATCH In review Felix Kuehling 2 participants 2 messages Jan 10, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: Fix kernel oops in amdgpu_dpm_switch_power_profile

Pass the correct pp_handle to pp_dpm_switch_power_profile.

Fixes 9bbdc6e48ec0 ("drm/amd/powerplay: cover the powerplay implementation details V2")
Change-Id Ia6998a836815c274509bd7967c1c148475252fa6
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c +2 -1
index f7c0ae6e0f8c..6c7dca1da992 100644
@@ -1123,7 +1123,8 @@ int amdgpu_dpm_switch_power_profile(struct amdgpu_device *adev,
 		ret = smu_switch_power_profile(&adev->smu, type, en);
 	else if (adev->powerplay.pp_funcs &&
 		 adev->powerplay.pp_funcs->switch_power_profile)
-		ret = adev->powerplay.pp_funcs->switch_power_profile(adev, type, en);
+		ret = adev->powerplay.pp_funcs->switch_power_profile(
+			adev->powerplay.pp_handle, type, en);
 
 	return ret;
 }
Signature · 6 lines
2.24.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by on v1 1/1
#1 lore raw

Thanks for the fix.

Quoted 33 lines

-----Original Message-----
From: Kuehling, Felix <[email protected]>
Sent: Friday, January 10, 2020 2:00 PM
To: [email protected]
Cc: Quan, Evan <[email protected]>
Subject: [PATCH 1/1] drm/amdgpu: Fix kernel oops in amdgpu_dpm_switch_power_profile

Pass the correct pp_handle to pp_dpm_switch_power_profile.

Fixes 9bbdc6e48ec0 ("drm/amd/powerplay: cover the powerplay

implementation details V2")

Change-Id Ia6998a836815c274509bd7967c1c148475252fa6
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c +2 -1
index f7c0ae6e0f8c..6c7dca1da992 100644
@@ -1123,7 +1123,8 @@ int amdgpu_dpm_switch_power_profile(struct
 amdgpu_device *adev,
 		ret = smu_switch_power_profile(&adev->smu, type, en);
 	else if (adev->powerplay.pp_funcs &&
 		 adev->powerplay.pp_funcs->switch_power_profile)
-		ret = adev->powerplay.pp_funcs->switch_power_profile(adev,
 type, en);
+		ret = adev->powerplay.pp_funcs->switch_power_profile(
+			adev->powerplay.pp_handle, type, en);
 
Quoted 4 lines

return ret;
}
--
2.24.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx