<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">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Series is:</p>
<p style="margin-top:0;margin-bottom:0">Reviewed-by: Alex Deucher <alexander.deucher@amd.com><br>
</p>
</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> Wednesday, October 10, 2018 4:13:15 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org<br>
<b>Cc:</b> Quan, Evan<br>
<b>Subject:</b> [PATCH 2/2] drm/amd/powerplay: hint when power profile setting is not supported</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Give user some hints when the power profile setting is not supported.<br>
<br>
Change-Id: Iba2b938d02a039ccdee32f9aca185f79fd818796<br>
Signed-off-by: Evan Quan <evan.quan@amd.com><br>
---<br>
drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 9 +++++++--<br>
1 file changed, 7 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c<br>
index 6bc8e9c08b0c..343d7f506bb4 100644<br>
--- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c<br>
+++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c<br>
@@ -897,9 +897,14 @@ static int pp_set_power_profile_mode(void *handle, long *input, uint32_t size)<br>
pr_info("%s was not implemented.\n", __func__);<br>
return ret;<br>
}<br>
+<br>
+ if (hwmgr->dpm_level != AMD_DPM_FORCED_LEVEL_MANUAL) {<br>
+ pr_info("power profile setting is for manual dpm mode only.\n");<br>
+ return ret;<br>
+ }<br>
+<br>
mutex_lock(&hwmgr->smu_lock);<br>
- if (hwmgr->dpm_level == AMD_DPM_FORCED_LEVEL_MANUAL)<br>
- ret = hwmgr->hwmgr_func->set_power_profile_mode(hwmgr, input, size);<br>
+ ret = hwmgr->hwmgr_func->set_power_profile_mode(hwmgr, input, size);<br>
mutex_unlock(&hwmgr->smu_lock);<br>
return ret;<br>
}<br>
-- <br>
2.19.1<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
</div>
</span></font></div>
</body>
</html>