amdgpu/pm: Disallow managing power profiles on SRIOV for Sienna Cichlid
Subsystems (3)
PATCH 1/1 amdgpu/pm: Disallow managing power profiles on SRIOV for Sienna Cichlid
Managing power profiles mode is not allowed in SRIOV mode for Sienna Cichlid. This patch is adjusting the "pp_power_profile_mode" and "power_dpm_force_performance_level" accordingly.
--- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 9 +++++++++ 1 file changed, 9 insertions(+)
drivers/gpu/drm/amd/pm/amdgpu_pm.c +9 -0
@@ -2025,6 +2025,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)) + *states =ATTR_STATE_UNSUPPORTED ; }switch (gc_ver) {
@@ -2038,6 +2040,13 @@ static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_ dev_attr->store =NULL ; }break ; +case IP_VERSION (10 ,3 ,0 ): +if (DEVICE_ATTR_IS (power_dpm_force_performance_level) && +amdgpu_sriov_vf (adev)) { + dev_attr->attr.mode &= ~S_IWUGO ; + dev_attr->store =NULL ; + } +break ;default :break ; }
Signature · 1 line
2.25.1
[AMD Official Use Only - General]
Quoted 54 lines
-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Danijel Slivka
Sent: Monday, May 9, 2022 7:47 PM
To: [email protected]
Cc: Slivka, Danijel <[email protected]>
Subject: [PATCH] amdgpu/pm: Disallow managing power profiles on SRIOV for Sienna CichlidManaging power profiles mode is not allowed in SRIOV mode for Sienna Cichlid.
This patch is adjusting the "pp_power_profile_mode" and "power_dpm_force_performance_level" accordingly.Signed-off-by Danijel Slivka <[email protected]>--- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 9 +++++++++ 1 file changed, 9 insertions(+)drivers/gpu/drm/amd/pm/amdgpu_pm.c +0
-0@@ -2025,6 +2025,8 @@ static int default_attr_update(struct
amdgpu_device*adev, structamdgpu_device_drivers/gpu/drm/amd/pm/amdgpu_pm.c +1
-1}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))drivers/gpu/drm/amd/pm/amdgpu_pm.c +1
-0+ *states =ATTR_STATE_UNSUPPORTED ; }switch (gc_ver) {@@ -2038,6 +2040,13 @@ static int default_attr_update(struct
amdgpu_device*adev, structamdgpu_device_drivers/gpu/drm/amd/pm/amdgpu_pm.c +2
-0dev_attr->store =NULL ; }break ; +case IP_VERSION (10 ,3 ,0 ): + if (DEVICE_ATTR_IS(power_dpm_force_performance_level)&&
drivers/gpu/drm/amd/pm/amdgpu_pm.c +5
-1+ amdgpu_sriov_vf(adev)) { + dev_attr->attr.mode &= ~S_IWUGO ; + dev_attr->store =NULL ; + } +break ;default :break ; } --2.25.1