aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux-5.4/linux-yocto-5.4.2/1310-drm-amdgpu-Fix-kernel-oops-in-amdgpu_dpm_switch_powe.patch
blob: 00d9f24aaf1636c28c1ffe9c03e38b8603a120b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From 4c3f474f4da1f5fe7e4a0c5514c6aa4ff09ee9e2 Mon Sep 17 00:00:00 2001
From: Felix Kuehling <Felix.Kuehling@amd.com>
Date: Fri, 10 Jan 2020 00:54:59 -0500
Subject: [PATCH 1310/1453] 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")
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Evan Quan <evan.quan@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.17.1