<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">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 Rex Zhu <Rex.Zhu@amd.com><br>
<b>Sent:</b> Tuesday, March 20, 2018 5:05:23 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org<br>
<b>Cc:</b> Zhu, Rex<br>
<b>Subject:</b> [PATCH] drm/amd/pp: Fix gfx ring test failed on Fiji without hw avfs support</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">caused by<br>
'commit ca82cec868d1 ("drm/amd/pp: Simplified the avfs btc state on smu7")'<br>
<br>
Change-Id: Ice0012e74ec3ef25cc561f8515ea6a553567d8a6<br>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com><br>
---<br>
drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c | 3 +++<br>
drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 6 ++++--<br>
2 files changed, 7 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c<br>
index 43432e4..faef783 100644<br>
--- a/drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c<br>
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/fiji_smumgr.c<br>
@@ -263,6 +263,9 @@ static int fiji_setup_graphics_level_structure(struct pp_hwmgr *hwmgr)<br>
<br>
static int fiji_avfs_event_mgr(struct pp_hwmgr *hwmgr)<br>
{<br>
+ if (!hwmgr->avfs_supported)<br>
+ return 0;<br>
+<br>
PP_ASSERT_WITH_CODE(0 == fiji_setup_graphics_level_structure(hwmgr),<br>
"[AVFS][fiji_avfs_event_mgr] Could not Copy Graphics Level"<br>
" table over to SMU",<br>
diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c<br>
index f6b1298..997a777 100644<br>
--- a/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c<br>
+++ b/drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c<br>
@@ -172,11 +172,13 @@ static int polaris10_setup_graphics_level_structure(struct pp_hwmgr *hwmgr)<br>
}<br>
<br>
<br>
-static int<br>
-polaris10_avfs_event_mgr(struct pp_hwmgr *hwmgr)<br>
+static int polaris10_avfs_event_mgr(struct pp_hwmgr *hwmgr)<br>
{<br>
struct smu7_smumgr *smu_data = (struct smu7_smumgr *)(hwmgr->smu_backend);<br>
<br>
+ if (!hwmgr->avfs_supported)<br>
+ return 0;<br>
+<br>
PP_ASSERT_WITH_CODE(0 == polaris10_setup_graphics_level_structure(hwmgr),<br>
"[AVFS][Polaris10_AVFSEventMgr] Could not Copy Graphics Level table over to SMU",<br>
return -EINVAL);<br>
-- <br>
1.9.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>