[AMD Official Use Only - Internal Distribution Only] Acked-by: Evan Quan <evan.quan@xxxxxxx> -----Original Message----- From: amd-gfx <amd-gfx-bounces@xxxxxxxxxxxxxxxxxxxxx> On Behalf Of Alex Deucher Sent: Friday, May 22, 2020 5:38 AM To: amd-gfx@xxxxxxxxxxxxxxxxxxxxx Cc: Deucher, Alexander <Alexander.Deucher@xxxxxxx> Subject: [PATCH] drm/amdgpu: fix sysfs power controls with multi-GPU Reset the SUPPORTED attribute. Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx> --- 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 _______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Cevan.quan%40amd.com%7C4f723e2ec23445c7cb1b08d7fdcf4618%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637256939010091750&sdata=pZgnlqdAqOFNIX%2FfDKUiB1J%2FoOIFz72E3pEaTgpTg2I%3D&reserved=0 _______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/amd-gfx