drm/amd/pm: Use correct check to skip setting in multi-vf
Subsystems (3)
PATCH 1/1 drm/amd/pm: Use correct check to skip setting in multi-vf
Use correct check to prevent pp clock setting in multi-vf mode
--- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/amdgpu_pm.c +1 -1
@@ -2058,7 +2058,7 @@ static int pp_dpm_clk_default_attr_update(struct amdgpu_device *adev, struct amd }/* setting should not be allowed from VF if not in one VF mode */ -if (amdgpu_sriov_vf (adev) &&amdgpu_sriov_is_pp_one_vf (adev)) { +if (amdgpu_sriov_multi_vf_mode (adev)) { dev_attr->attr.mode &= ~S_IWUGO ; dev_attr->store =NULL ; }
Signature · 1 line
2.46.0
[AMD Official Use Only - AMD Internal Distribution Only]
This code path should be explicitly droped, as the mask value is required to be 0 in multi-VF cases, which would result in an immediate return from the function anyway.
case SRIOV_VF_MODE_MULTI_VF:
mask = 0;
break;
if (!(attr->flags & mask)) {
*states = ATTR_STATE_UNSUPPORTED;
return 0;
}Best Regards,
Kevin
-----Original Message-----
From: Kamal, Asad <[email protected]>
Sent: Wednesday, February 4, 2026 3:57 PM
To: [email protected]
Cc: Lazar, Lijo <[email protected]>; Zhang, Hawking <[email protected]>; Ma, Le <[email protected]>; Zhang, Morris <[email protected]>; Deucher, Alexander <[email protected]>; Wang, Yang(Kevin) <[email protected]>; Kamal, Asad <[email protected]>
Subject: [PATCH] drm/amd/pm: Use correct check to skip setting in multi-vf
Use correct check to prevent pp clock setting in multi-vf mode
--- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/pm/amdgpu_pm.c +1 -1
@@ -2058,7 +2058,7 @@ static int pp_dpm_clk_default_attr_update(struct amdgpu_device *adev, struct amd }/* setting should not be allowed from VF if not in one VF mode */ -if (amdgpu_sriov_vf (adev) &&amdgpu_sriov_is_pp_one_vf (adev)) { +if (amdgpu_sriov_multi_vf_mode (adev)) { dev_attr->attr.mode &= ~S_IWUGO ; dev_attr->store =NULL ; }
--
2.46.0