Skip to contentSkip to conversation

drm/amd/pm: Disallow managing power profiles on SRIOV for gc11.0.3

PATCH In review Victor Zhao 2 participants 3 messages Sep 26, 2023 – Sep 27, 2023

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

PATCH 1/1 drm/amd/pm: Disallow managing power profiles on SRIOV for gc11.0.3

disable pp_power_profile_mode for sriov on gc11.0.3 as not supported by smu

---
 drivers/gpu/drm/amd/pm/amdgpu_pm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/amdgpu_pm.c +2 -1
index 2d19282e4fbe..b6f32d57b81f 100644
@@ -2122,7 +2122,8 @@ static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_
 	} else if (DEVICE_ATTR_IS(pp_power_profile_mode)) {
 		if (amdgpu_dpm_get_power_profile_mode(adev, NULL) == -EOPNOTSUPP)
 			*states = ATTR_STATE_UNSUPPORTED;
-		else if (gc_ver == IP_VERSION(10, 3, 0) && amdgpu_sriov_vf(adev))
+		else if ((gc_ver == IP_VERSION(10, 3, 0) ||
+			  gc_ver == IP_VERSION(11, 0, 3)) && amdgpu_sriov_vf(adev))
 			*states = ATTR_STATE_UNSUPPORTED;
 	}
 
Signature · 1 line
2.34.1
#1 lore raw

[AMD Official Use Only - General]

Ping on this patch. Please help review.

Thanks,
Victor

-----Original Message-----
From: Victor Zhao <[email protected]>
Sent: Tuesday, September 26, 2023 11:09 AM
To: [email protected]
Cc: Zhao, Victor <[email protected]>
Subject: [PATCH] drm/amd/pm: Disallow managing power profiles on SRIOV for gc11.0.3

disable pp_power_profile_mode for sriov on gc11.0.3 as not supported by smu

---
 drivers/gpu/drm/amd/pm/amdgpu_pm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/amdgpu_pm.c +2 -1
index 2d19282e4fbe..b6f32d57b81f 100644
@@ -2122,7 +2122,8 @@ static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_
        } else if (DEVICE_ATTR_IS(pp_power_profile_mode)) {
                if (amdgpu_dpm_get_power_profile_mode(adev, NULL) == -EOPNOTSUPP)
                        *states = ATTR_STATE_UNSUPPORTED;
-               else if (gc_ver == IP_VERSION(10, 3, 0) && amdgpu_sriov_vf(adev))
+               else if ((gc_ver == IP_VERSION(10, 3, 0) ||
+                         gc_ver == IP_VERSION(11, 0, 3)) && amdgpu_sriov_vf(adev))
                        *states = ATTR_STATE_UNSUPPORTED;
        }
 

--
2.34.1

maintainer Acked-by on v1 1/1
#2 lore raw
In reply to Victor Zhao

[Public]

________________________________
From: amd-gfx <[email protected]> on behalf of Victor Zhao <[email protected]>
Sent: Monday, September 25, 2023 11:08 PM
To: [email protected] <[email protected]>
Cc: Zhao, Victor <[email protected]>
Subject: [PATCH] drm/amd/pm: Disallow managing power profiles on SRIOV for gc11.0.3

disable pp_power_profile_mode for sriov on gc11.0.3 as not supported by smu

---
 drivers/gpu/drm/amd/pm/amdgpu_pm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/amdgpu_pm.c +2 -1
index 2d19282e4fbe..b6f32d57b81f 100644
@@ -2122,7 +2122,8 @@ static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_
         } else if (DEVICE_ATTR_IS(pp_power_profile_mode)) {
                 if (amdgpu_dpm_get_power_profile_mode(adev, NULL) == -EOPNOTSUPP)
                         *states = ATTR_STATE_UNSUPPORTED;
-               else if (gc_ver == IP_VERSION(10, 3, 0) && amdgpu_sriov_vf(adev))
+               else if ((gc_ver == IP_VERSION(10, 3, 0) ||
+                         gc_ver == IP_VERSION(11, 0, 3)) && amdgpu_sriov_vf(adev))
                         *states = ATTR_STATE_UNSUPPORTED;
         }
 

--
2.34.1