Commit e610941c authored by Yiqing Yao's avatar Yiqing Yao Committed by Alex Deucher

drm/amd/pm: enable pm sysfs write for one VF mode

[why]
pm sysfs should be writable in one VF mode as is in passthrough

[how]
do not remove write access on pm sysfs if device is in one VF mode

Fixes: 11c9cc95 ("amdgpu/pm: Make sysfs pm attributes as read-only for VFs")
Signed-off-by: default avatarYiqing Yao <yiqing.yao@amd.com>
Reviewed-by: default avatarMonk Liu <Monk.liu@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent b874c667
......@@ -2032,8 +2032,8 @@ static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_
}
}
/* setting should not be allowed from VF */
if (amdgpu_sriov_vf(adev)) {
/* 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;
}
......
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