Skip to contentSkip to conversation

drm/amdgpu: skip power profile switch in sriov

PATCH In review Jingwen Chen 3 participants 3 messages Nov 26, 2020 – Nov 27, 2020

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

PATCH 1/1 drm/amdgpu: skip power profile switch in sriov

power profile switch in vcn need to send SetWorkLoad msg to smu, which is not supported in sriov.

---
 drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/pm/amdgpu_dpm.c +3 -0
index 17a45baff638..8fb12afe3c96 100644
@@ -1168,6 +1168,9 @@ int amdgpu_dpm_switch_power_profile(struct amdgpu_device *adev,
 {
 	int ret = 0;
 
+	if (amdgpu_sriov_vf(adev))
+		return 0;
+
 	if (is_support_sw_smu(adev))
 		ret = smu_switch_power_profile(&adev->smu, type, en);
 	else if (adev->powerplay.pp_funcs &&
Signature · 6 lines
2.25.1

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

[AMD Public Use]

-----Original Message-----
From: Jingwen Chen <[email protected]>
Sent: Thursday, November 26, 2020 4:38 PM
To: [email protected]; Zhao, Jiange <[email protected]>
Cc: Chen, JingWen <[email protected]>
Subject: [PATCH] drm/amdgpu: skip power profile switch in sriov

power profile switch in vcn need to send SetWorkLoad msg to smu, which is not supported in sriov.

---
 drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/pm/amdgpu_dpm.c +3 -1
index 17a45baff638..8fb12afe3c96 100644
@@ -1168,6 +1168,9 @@ int amdgpu_dpm_switch_power_profile(struct amdgpu_device *adev,  {
 	int ret = 0;
 
+	if (amdgpu_sriov_vf(adev))
+		return 0;
+
 	if (is_support_sw_smu(adev))
 		ret = smu_switch_power_profile(&adev->smu, type, en);
 	else if (adev->powerplay.pp_funcs &&
--

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

Acked-by on v1 1/1
#2 lore raw
In reply to Jingwen Chen

[AMD Official Use Only - Internal Distribution Only]

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Jingwen Chen
Sent: Thursday, November 26, 2020 4:38 PM
To: [email protected]; Zhao, Jiange <[email protected]>
Cc: Chen, JingWen <[email protected]>
Subject: [PATCH] drm/amdgpu: skip power profile switch in sriov

power profile switch in vcn need to send SetWorkLoad msg to smu, which is not supported in sriov.

---
 drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/pm/amdgpu_dpm.c +3 -1
index 17a45baff638..8fb12afe3c96 100644
@@ -1168,6 +1168,9 @@ int amdgpu_dpm_switch_power_profile(struct amdgpu_device *adev,  {
 int ret = 0;
 
+if (amdgpu_sriov_vf(adev))
+return 0;
+
 if (is_support_sw_smu(adev))
 ret = smu_switch_power_profile(&adev->smu, type, en);
 else if (adev->powerplay.pp_funcs &&
--

2.25.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=04%7C01%7Cevan.quan%40amd.com%7Ca24d4843e0a84a161aaa08d891e69af0%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637419766916626849%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=uJk3bchf%2Fen1BTWQXiCN4Dcb3iRR%2FdZ%2FqwQ9%2Fgebo%2BQ%3D&amp;reserved=0
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx