[AMD Official Use Only - AMD Internal Distribution Only]

> Remove redundant and incorrect multi-vf check for pp clock setting, as
> the code path will never be taken. Mask check take care of same.

I suspect there might be a misunderstanding of the code logic here. This is not 
redundant code.
Currently, AMDGPU does not support the multi-vf case, so no sysfs node will be 
created for it.
However, in one-vf mode, for security reasons, setting frequency information 
from the vf side is not allowed.
Therefore, the .store interface is removed and the node permissions are 
configured as read-only.
In conclusion, this segment of code serves a clear purpose and is by no means 
redundant.

Best Regards,
Kevin
-----Original Message-----
From: Lazar, Lijo <[email protected]>
Sent: Wednesday, February 4, 2026 5:31 PM
To: Kamal, Asad <[email protected]>; [email protected]
Cc: Zhang, Hawking <[email protected]>; Ma, Le <[email protected]>; Zhang, 
Morris <[email protected]>; Deucher, Alexander <[email protected]>; 
Wang, Yang(Kevin) <[email protected]>
Subject: Re: [PATCH v2] drm/amd/pm: Remove redundant and incorrect multi-vf 
check



On 04-Feb-26 1:55 PM, Asad Kamal wrote:
> Remove redundant and incorrect multi-vf check for pp clock setting, as
> the code path will never be taken. Mask check take care of same.
>
> v2: Update patch title, Remove the check (Kevin)
>
> Fixes: 166a3c735c95 ("drm/amd/pm: centralize all pp_dpm_xxx attribute
> nodes update cb")
>
> Signed-off-by: Asad Kamal <[email protected]>

You may drop any redundant multivf check in other attr_update calls also.

Thanks,
Lijo

> ---
>   drivers/gpu/drm/amd/pm/amdgpu_pm.c | 6 ------
>   1 file changed, 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
> b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
> index 07641c9413d2..81bef5c5aae9 100644
> --- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
> +++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
> @@ -2057,12 +2057,6 @@ static int pp_dpm_clk_default_attr_update(struct 
> amdgpu_device *adev, struct amd
>               break;
>       }
>
> -     /* 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)) {
> -             dev_attr->attr.mode &= ~S_IWUGO;
> -             dev_attr->store = NULL;
> -     }
> -
>       return 0;
>   }
>

Reply via email to