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

Felix Kuehling Felix.Kuehling at amd.com
Fri Jan 10 05:59:33 UTC 2020


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
Signed-off-by: Felix Kuehling <Felix.Kuehling at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c
index f7c0ae6e0f8c..6c7dca1da992 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c
@@ -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;
 }
-- 
2.24.1



More information about the amd-gfx mailing list