<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<p style="font-family:Arial;font-size:10pt;color:#0078D7;margin:15pt;" align="Left">
[AMD Official Use Only - Internal Distribution Only]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span style="background-color: rgba(0, 0, 0, 0); color: rgb(50, 49, 48); font-family: "segoe ui", "segoe ui web (west european)", "segoe ui", -apple-system, blinkmacsystemfont, roboto, "helvetica neue", sans-serif; font-size: 11pt;">Hi Alex,</span><br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
<br>
</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif">
<span style="margin: 0px; font-size: 11pt; font-family: "segoe ui", "segoe ui web (west european)", "segoe ui", -apple-system, blinkmacsystemfont, roboto, "helvetica neue", sans-serif; color: rgb(50, 49, 48); background-color: rgba(0, 0, 0, 0)">the flag of
"ATTR_STATE_[UN]SUPPORTED" should be binding to device not device attribute node,</span></div>
<div style="margin: 0px; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; color: rgb(50, 49, 48)">
<font face="segoe ui, segoe ui web (west european), segoe ui, -apple-system, blinkmacsystemfont, roboto, helvetica neue, sans-serif"><span style="margin: 0px; font-size: 14.6667px"></span></font></div>
<span style="margin: 0px; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; color: rgb(50, 49, 48)">when inserting two different video cards, the driver may be need
to create different node according device type (vega, navi,...),</span>
<div style="margin: 0px; font-family: "Segoe UI", "Segoe UI Web (West European)", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", sans-serif; color: rgb(50, 49, 48)">
<span style="margin: 0px">and when unload driver, the driver also need remove different node according device type and the state of ATTR_STATE_SUPPORTED.<br>
</span>
<div style="margin: 0px"><font face="segoe ui, segoe ui web (west european), segoe ui, -apple-system, blinkmacsystemfont, roboto, helvetica neue, sans-serif"><span style="margin: 0px; font-size: 14.6667px">so i think the ATTR_STATE_XXX is not work well on multi
gpu, so we'd better revert previous patch.</span></font></div>
<div style="margin: 0px"><font face="segoe ui, segoe ui web (west european), segoe ui, -apple-system, blinkmacsystemfont, roboto, helvetica neue, sans-serif"><span style="margin: 0px; font-size: 14.6667px">thanks.</span></font></div>
<div style="margin: 0px">
<div style="margin: 0px"><span style="margin: 0px"></span>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif; color: rgb(0, 0, 0)">
<br>
</div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif; color: rgb(0, 0, 0)">
<span style="margin: 0px; font-size: 11pt; font-family: "segoe ui", "segoe ui web (west european)", "segoe ui", -apple-system, blinkmacsystemfont, roboto, "helvetica neue", sans-serif; color: rgb(50, 49, 48); background-color: rgba(0, 0, 0, 0)">Best Regards,</span></div>
<div style="margin: 0px; font-size: 12pt; font-family: Calibri, Arial, Helvetica, sans-serif; color: rgb(0, 0, 0)">
<span style="margin: 0px; font-size: 11pt; font-family: "segoe ui", "segoe ui web (west european)", "segoe ui", -apple-system, blinkmacsystemfont, roboto, "helvetica neue", sans-serif; color: rgb(50, 49, 48); background-color: rgba(0, 0, 0, 0)">Kevin</span></div>
</div>
</div>
</div>
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Quan, Evan <Evan.Quan@amd.com><br>
<b>Sent:</b> Friday, May 22, 2020 1:35 PM<br>
<b>To:</b> Alex Deucher <alexdeucher@gmail.com>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Deucher, Alexander <Alexander.Deucher@amd.com><br>
<b>Subject:</b> RE: [PATCH] drm/amdgpu: fix sysfs power controls with multi-GPU</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText">[AMD Official Use Only - Internal Distribution Only]<br>
<br>
[AMD Official Use Only - Internal Distribution Only]<br>
<br>
Acked-by: Evan Quan <evan.quan@amd.com><br>
<br>
-----Original Message-----<br>
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> On Behalf Of Alex Deucher<br>
Sent: Friday, May 22, 2020 5:38 AM<br>
To: amd-gfx@lists.freedesktop.org<br>
Cc: Deucher, Alexander <Alexander.Deucher@amd.com><br>
Subject: [PATCH] drm/amdgpu: fix sysfs power controls with multi-GPU<br>
<br>
Reset the SUPPORTED attribute.<br>
<br>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com><br>
---<br>
<br>
This fixes multi-GPU, but I think we could still race without some sort of locking around the attr array.<br>
<br>
drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 2 ++<br>
1 file changed, 2 insertions(+)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c<br>
index e06fef6174e5..4c65444e9ef7 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c<br>
@@ -1790,6 +1790,8 @@ static int amdgpu_device_attr_create(struct amdgpu_device *adev,<br>
<br>
BUG_ON(!attr);<br>
<br>
+attr->states = ATTR_STATE_SUPPORTED;<br>
+<br>
attr_update = attr->attr_update ? attr_update : default_attr_update;<br>
<br>
ret = attr_update(adev, attr, mask);<br>
--<br>
2.25.4<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7CKevin1.Wang%40amd.com%7Cd86afa6ac5ab49bd75d208d7fe11ed8d%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637257225315854026&sdata=TMiKBdpSF4wPgkLgbRBtTloPLFBHyyLXuO%2BxSgSE%2BeY%3D&reserved=0">https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7CKevin1.Wang%40amd.com%7Cd86afa6ac5ab49bd75d208d7fe11ed8d%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637257225315854026&sdata=TMiKBdpSF4wPgkLgbRBtTloPLFBHyyLXuO%2BxSgSE%2BeY%3D&reserved=0</a><br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7CKevin1.Wang%40amd.com%7Cd86afa6ac5ab49bd75d208d7fe11ed8d%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637257225315864023&sdata=MtypjxOmgqJhKwNEMH75r3Z%2F9M3Uv7qTpOjQo1yBSVk%3D&reserved=0">https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7CKevin1.Wang%40amd.com%7Cd86afa6ac5ab49bd75d208d7fe11ed8d%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637257225315864023&sdata=MtypjxOmgqJhKwNEMH75r3Z%2F9M3Uv7qTpOjQo1yBSVk%3D&reserved=0</a><br>
</div>
</span></font></div>
</div>
</body>
</html>