<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:#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);">
Reviewed-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 Nirmoy Das <nirmoy.aiemd@gmail.com><br>
<b>Sent:</b> Tuesday, June 23, 2020 5:43 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Das, Nirmoy <Nirmoy.Das@amd.com><br>
<b>Subject:</b> [PATCH 1/1] drm/amd/powerplay: return current DCEFCLK on sysfs read</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">This fixes incorrect output when reading pp_dpm_dcefclk sysfs.<br>
<br>
Output before this patch:<br>
cat /sys/devices/pci0000:<snip>/pp_dpm_dcefclk<br>
0: 506Mhz<br>
1: 42949671Mhz *<br>
2: 1266Mhz<br>
<br>
Signed-off-by: Nirmoy Das <nirmoy.das@amd.com><br>
---<br>
 drivers/gpu/drm/amd/powerplay/arcturus_ppt.c       | 3 +++<br>
 drivers/gpu/drm/amd/powerplay/navi10_ppt.c         | 3 +++<br>
 drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c | 3 +++<br>
 3 files changed, 9 insertions(+)<br>
<br>
diff --git a/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c b/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c<br>
index d93f8a43a96f..daeae14fd380 100644<br>
--- a/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c<br>
+++ b/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c<br>
@@ -962,6 +962,9 @@ static int arcturus_get_smu_metrics_data(struct smu_context *smu,<br>
         case METRICS_CURR_FCLK:<br>
                 *value = metrics->CurrClock[PPCLK_FCLK];<br>
                 break;<br>
+       case METRICS_CURR_DCEFCLK:<br>
+               *value = metrics->CurrClock[PPCLK_DCEFCLK];<br>
+               break;<br>
         case METRICS_AVERAGE_GFXCLK:<br>
                 *value = metrics->AverageGfxclkFrequency;<br>
                 break;<br>
diff --git a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c<br>
index 6c2f582bad5d..42ade9df0d6a 100644<br>
--- a/drivers/gpu/drm/amd/powerplay/navi10_ppt.c<br>
+++ b/drivers/gpu/drm/amd/powerplay/navi10_ppt.c<br>
@@ -613,6 +613,9 @@ static int navi10_get_smu_metrics_data(struct smu_context *smu,<br>
         case METRICS_CURR_DCLK:<br>
                 *value = metrics->CurrClock[PPCLK_DCLK];<br>
                 break;<br>
+       case METRICS_CURR_DCEFCLK:<br>
+               *value = metrics->CurrClock[PPCLK_DCEFCLK];<br>
+               break;<br>
         case METRICS_AVERAGE_GFXCLK:<br>
                 *value = metrics->AverageGfxclkFrequency;<br>
                 break;<br>
diff --git a/drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c b/drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c<br>
index 0957957a2cf5..1378dabb6463 100644<br>
--- a/drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c<br>
+++ b/drivers/gpu/drm/amd/powerplay/sienna_cichlid_ppt.c<br>
@@ -605,6 +605,9 @@ static int sienna_cichlid_get_smu_metrics_data(struct smu_context *smu,<br>
         case METRICS_CURR_DCLK1:<br>
                 *value = metrics->CurrClock[PPCLK_DCLK_1];<br>
                 break;<br>
+       case METRICS_CURR_DCEFCLK:<br>
+               *value = metrics->CurrClock[PPCLK_DCEFCLK];<br>
+               break;<br>
         case METRICS_AVERAGE_GFXCLK:<br>
                 *value = metrics->AverageGfxclkFrequency;<br>
                 break;<br>
-- <br>
2.27.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&amp;data=02%7C01%7Calexander.deucher%40amd.com%7C75a22f8a1b564c09bc9508d81759b036%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637285021304836731&amp;sdata=VHh%2BYyp5tQBvIut5KLmb963jJnk%2BILJKF1I5BffqsF8%3D&amp;reserved=0">https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7Calexander.deucher%40amd.com%7C75a22f8a1b564c09bc9508d81759b036%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637285021304836731&amp;sdata=VHh%2BYyp5tQBvIut5KLmb963jJnk%2BILJKF1I5BffqsF8%3D&amp;reserved=0</a><br>
</div>
</span></font></div>
</div>
</body>
</html>