<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);">
Assuming the updated table it 64 bit aligned, the series is:</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> Quan, Evan <Evan.Quan@amd.com><br>
<b>Sent:</b> Tuesday, April 27, 2021 9:43 PM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Deucher, Alexander <Alexander.Deucher@amd.com>; Kasiviswanathan, Harish <Harish.Kasiviswanathan@amd.com>; Quan, Evan <Evan.Quan@amd.com><br>
<b>Subject:</b> [PATCH 1/2] drm/amd/pm: new gpu_metrics structure for pmfw attached timestamp</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Supported by some latest ASICs.<br>
<br>
Change-Id: I0bb26df87d10f1b356b5b9bf008a1422a8fe60d9<br>
Signed-off-by: Evan Quan <evan.quan@amd.com><br>
---<br>
 .../gpu/drm/amd/include/kgd_pp_interface.h    | 62 +++++++++++++++++++<br>
 1 file changed, 62 insertions(+)<br>
<br>
diff --git a/drivers/gpu/drm/amd/include/kgd_pp_interface.h b/drivers/gpu/drm/amd/include/kgd_pp_interface.h<br>
index 71018a5fb0b0..f6818dd84145 100644<br>
--- a/drivers/gpu/drm/amd/include/kgd_pp_interface.h<br>
+++ b/drivers/gpu/drm/amd/include/kgd_pp_interface.h<br>
@@ -474,6 +474,68 @@ struct gpu_metrics_v1_1 {<br>
         uint16_t                        temperature_hbm[NUM_HBM_INSTANCES];<br>
 };<br>
 <br>
+struct gpu_metrics_v1_2 {<br>
+       struct metrics_table_header     common_header;<br>
+<br>
+       /* Temperature */<br>
+       uint16_t                        temperature_edge;<br>
+       uint16_t                        temperature_hotspot;<br>
+       uint16_t                        temperature_mem;<br>
+       uint16_t                        temperature_vrgfx;<br>
+       uint16_t                        temperature_vrsoc;<br>
+       uint16_t                        temperature_vrmem;<br>
+<br>
+       /* Utilization */<br>
+       uint16_t                        average_gfx_activity;<br>
+       uint16_t                        average_umc_activity; // memory controller<br>
+       uint16_t                        average_mm_activity; // UVD or VCN<br>
+<br>
+       /* Power/Energy */<br>
+       uint16_t                        average_socket_power;<br>
+       uint64_t                        energy_accumulator;<br>
+<br>
+       /* Driver attached timestamp (in ns) */<br>
+       uint64_t                        system_clock_counter;<br>
+<br>
+       /* Average clocks */<br>
+       uint16_t                        average_gfxclk_frequency;<br>
+       uint16_t                        average_socclk_frequency;<br>
+       uint16_t                        average_uclk_frequency;<br>
+       uint16_t                        average_vclk0_frequency;<br>
+       uint16_t                        average_dclk0_frequency;<br>
+       uint16_t                        average_vclk1_frequency;<br>
+       uint16_t                        average_dclk1_frequency;<br>
+<br>
+       /* Current clocks */<br>
+       uint16_t                        current_gfxclk;<br>
+       uint16_t                        current_socclk;<br>
+       uint16_t                        current_uclk;<br>
+       uint16_t                        current_vclk0;<br>
+       uint16_t                        current_dclk0;<br>
+       uint16_t                        current_vclk1;<br>
+       uint16_t                        current_dclk1;<br>
+<br>
+       /* Throttle status */<br>
+       uint32_t                        throttle_status;<br>
+<br>
+       /* Fans */<br>
+       uint16_t                        current_fan_speed;<br>
+<br>
+       /* Link width/speed */<br>
+       uint16_t                        pcie_link_width;<br>
+       uint16_t                        pcie_link_speed; // in 0.1 GT/s<br>
+<br>
+       uint16_t                        padding;<br>
+<br>
+       uint32_t                        gfx_activity_acc;<br>
+       uint32_t                        mem_activity_acc;<br>
+<br>
+       uint16_t                        temperature_hbm[NUM_HBM_INSTANCES];<br>
+<br>
+       /* PMFW attached timestamp (10ns resolution) */<br>
+       uint64_t                        firmware_timestamp;<br>
+};<br>
+<br>
 /*<br>
  * gpu_metrics_v2_0 is not recommended as it's not naturally aligned.<br>
  * Use gpu_metrics_v2_1 or later instead.<br>
-- <br>
2.29.0<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>