mirror of
https://github.com/torvalds/linux.git
synced 2026-06-06 13:37:36 +02:00
drm/amd/pm: enable pm sysfs write for one VF mode
[ Upstream commite610941c45] [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:11c9cc95f8("amdgpu/pm: Make sysfs pm attributes as read-only for VFs") Signed-off-by: Yiqing Yao <yiqing.yao@amd.com> Reviewed-by: Monk Liu <Monk.liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
06e778d184
commit
80b96ac9d2
|
|
@ -2098,8 +2098,8 @@ static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* setting should not be allowed from VF */
|
/* setting should not be allowed from VF if not in one VF mode */
|
||||||
if (amdgpu_sriov_vf(adev)) {
|
if (amdgpu_sriov_vf(adev) && !amdgpu_sriov_is_pp_one_vf(adev)) {
|
||||||
dev_attr->attr.mode &= ~S_IWUGO;
|
dev_attr->attr.mode &= ~S_IWUGO;
|
||||||
dev_attr->store = NULL;
|
dev_attr->store = NULL;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user