mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 01:55:51 +02:00
drm/amd/pm: make pp_features read-only when scpm is enabled
SCPM owns power feature control when enabled. Make pp_features read-only during sysfs setup by clearing its write bits and store callback. Signed-off-by: Yang Wang <kevinyang.wang@amd.com> Reviewed-by: Asad Kamal <asad.kamal@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> (cherry picked from commit 6a5786e191fdce36c5db170e5209cf609e8f0087) Cc: stable@vger.kernel.org
This commit is contained in:
parent
767648c18d
commit
53c78ab388
|
|
@ -2696,6 +2696,11 @@ static int default_attr_update(struct amdgpu_device *adev, struct amdgpu_device_
|
|||
gc_ver != IP_VERSION(9, 4, 3)) ||
|
||||
gc_ver < IP_VERSION(9, 0, 0))
|
||||
*states = ATTR_STATE_UNSUPPORTED;
|
||||
|
||||
if (adev->scpm_enabled) {
|
||||
dev_attr->attr.mode &= ~S_IWUGO;
|
||||
dev_attr->store = NULL;
|
||||
}
|
||||
} else if (DEVICE_ATTR_IS(gpu_metrics)) {
|
||||
if (gc_ver < IP_VERSION(9, 1, 0))
|
||||
*states = ATTR_STATE_UNSUPPORTED;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user