[PATCH] drm/amdgpu: fix sysfs power controls with multi-GPU
Alex Deucher
alexdeucher at gmail.com
Thu May 21 21:38:06 UTC 2020
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,
BUG_ON(!attr);
+ attr->states = ATTR_STATE_SUPPORTED;
+
attr_update = attr->attr_update ? attr_update : default_attr_update;
ret = attr_update(adev, attr, mask);
--
2.25.4
More information about the amd-gfx
mailing list