mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-09-22 09:34:56 +02:00
drm/amd/pm: make pp_features read-only when scpm is enabled
commit53c78ab388upstream. 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 commit6a5786e191) Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
ada47af5c2
commit
e75f71143b
@@ -2619,6 +2619,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;
|
||||
|
||||
Reference in New Issue
Block a user