Commit 734ae8ef authored by Lin.Cao's avatar Lin.Cao Committed by Alex Deucher

drm/amd/pm set pp_dpm_*clk as read only for SRIOV one VF mode

pp_dpm_*clk should be set as read only for SRIOV one VF mode, remove
S_IWUGO flag and _store function of these debugfs in one VF mode.
Signed-off-by: default avatarLin.Cao <lincao12@amd.com>
Acked-by: default avatarJingwen Chen <Jingwen.Chen2@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 3be6a63e
...@@ -2379,7 +2379,15 @@ static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_ ...@@ -2379,7 +2379,15 @@ static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_
} }
/* setting should not be allowed from VF if not in one VF mode */ /* 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) ||
DEVICE_ATTR_IS(pp_dpm_sclk) ||
DEVICE_ATTR_IS(pp_dpm_mclk) ||
DEVICE_ATTR_IS(pp_dpm_socclk) ||
DEVICE_ATTR_IS(pp_dpm_fclk) ||
DEVICE_ATTR_IS(pp_dpm_vclk) ||
DEVICE_ATTR_IS(pp_dpm_vclk1) ||
DEVICE_ATTR_IS(pp_dpm_dclk) ||
DEVICE_ATTR_IS(pp_dpm_dclk1))) {
dev_attr->attr.mode &= ~S_IWUGO; dev_attr->attr.mode &= ~S_IWUGO;
dev_attr->store = NULL; dev_attr->store = NULL;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment