提交 2357947a 编写于 作者: Y Yiqing Yao 提交者: Zheng Zengkai

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

stable inclusion
from stable-v5.10.110
commit 80b96ac9d2fb06a364737c8de4b46a7c22aab1b8
bugzilla: https://gitee.com/openeuler/kernel/issues/I574AL

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=80b96ac9d2fb06a364737c8de4b46a7c22aab1b8

--------------------------------

[ Upstream commit e610941c ]

[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: NYiqing Yao <yiqing.yao@amd.com>
Reviewed-by: NMonk Liu <Monk.liu@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NYu Liao <liaoyu15@huawei.com>
Reviewed-by: NWei Li <liwei391@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 467037c7
......@@ -2098,8 +2098,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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册