[PATCH] drm/amdgpu: fix sysfs power controls with multi-GPU

Quan, Evan Evan.Quan at amd.com
Fri May 22 05:35:17 UTC 2020

[AMD Official Use Only - Internal Distribution Only]

Acked-by: Evan Quan <evan.quan at amd.com>

-----Original Message-----
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of Alex Deucher
Sent: Friday, May 22, 2020 5:38 AM
To: amd-gfx at lists.freedesktop.org
Cc: Deucher, Alexander <Alexander.Deucher at amd.com>
Subject: [PATCH] drm/amdgpu: fix sysfs power controls with multi-GPU

Reset the SUPPORTED attribute.

Signed-off-by: Alex Deucher <alexander.deucher at amd.com>

This fixes multi-GPU, but I think we could still race without some sort of locking around the attr array.

 drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
index e06fef6174e5..4c65444e9ef7 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c
@@ -1790,6 +1790,8 @@ static int amdgpu_device_attr_create(struct amdgpu_device *adev,


+attr->states = ATTR_STATE_SUPPORTED;
 attr_update = attr->attr_update ? attr_update : default_attr_update;

 ret = attr_update(adev, attr, mask);

amd-gfx mailing list
amd-gfx at lists.freedesktop.org

More information about the amd-gfx mailing list