<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<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:#317100;margin:15pt;" align="Left">
[AMD Public Use]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Acked-by: Alex Deucher <alexander.deucher@amd.com><br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Evan Quan <evan.quan@amd.com><br>
<b>Sent:</b> Tuesday, February 11, 2020 12:41 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Quan, Evan <Evan.Quan@amd.com><br>
<b>Subject:</b> [PATCH] drm/amd/powerplay: always refetch the enabled features status on dpm enablement</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Otherwise, the cached dpm features status may be inconsistent under some<br>
case(e.g. baco reset of Navi asic).<br>
<br>
Change-Id: Ia7d7089e82cbe4ccaa9fadce1f2f0043c42c73df<br>
Signed-off-by: Evan Quan <evan.quan@amd.com><br>
---<br>
drivers/gpu/drm/amd/powerplay/smu_v11_0.c | 6 +++---<br>
1 file changed, 3 insertions(+), 3 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c<br>
index 0dc49479a7eb..b06c057a9002 100644<br>
--- a/drivers/gpu/drm/amd/powerplay/smu_v11_0.c<br>
+++ b/drivers/gpu/drm/amd/powerplay/smu_v11_0.c<br>
@@ -898,6 +898,9 @@ int smu_v11_0_system_features_control(struct smu_context *smu,<br>
if (ret)<br>
return ret;<br>
<br>
+ bitmap_zero(feature->enabled, feature->feature_num);<br>
+ bitmap_zero(feature->supported, feature->feature_num);<br>
+<br>
if (en) {<br>
ret = smu_feature_get_enabled_mask(smu, feature_mask, 2);<br>
if (ret)<br>
@@ -907,9 +910,6 @@ int smu_v11_0_system_features_control(struct smu_context *smu,<br>
feature->feature_num);<br>
bitmap_copy(feature->supported, (unsigned long *)&feature_mask,<br>
feature->feature_num);<br>
- } else {<br>
- bitmap_zero(feature->enabled, feature->feature_num);<br>
- bitmap_zero(feature->supported, feature->feature_num);<br>
}<br>
<br>
return ret;<br>
-- <br>
2.25.0<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%7Calexander.deucher%40amd.com%7C8aeb99fc3dd046dbbaa208d7aeb51500%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637169965095304122&sdata=QeFFA07xzLC07niJ9fiBG7g5cxN99GcXHnnM%2BK4PiWg%3D&reserved=0">https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Calexander.deucher%40amd.com%7C8aeb99fc3dd046dbbaa208d7aeb51500%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637169965095304122&sdata=QeFFA07xzLC07niJ9fiBG7g5cxN99GcXHnnM%2BK4PiWg%3D&reserved=0</a><br>
</div>
</span></font></div>
</div>
</body>
</html>