The condition was checking if VF is in one-VF mode to disable writes,
but should check if VF is NOT in one-VF mode. Add the missing negation.

Signed-off-by: YuanShang <[email protected]>
---
 drivers/gpu/drm/amd/pm/amdgpu_pm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c 
b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
index 938361ecae05..17fea9a2aa28 100644
--- a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
@@ -2057,7 +2057,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_vf(adev) && !amdgpu_sriov_is_pp_one_vf(adev)) {
                dev_attr->attr.mode &= ~S_IWUGO;
                dev_attr->store = NULL;
        }
-- 
2.25.1

Reply via email to