<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">Acked-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 mikita.lipski@amd.com <mikita.lipski@amd.com><br>
<b>Sent:</b> Monday, April 16, 2018 11:22:46 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org; Wentland, Harry; Zhu, Rex; Deucher, Alexander<br>
<b>Cc:</b> Lipski, Mikita<br>
<b>Subject:</b> [PATCH 1/2] drm/amd/pp: Adding set_watermarks_for_clocks_ranges for SMU10</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">From: Mikita Lipski <mikita.lipski@amd.com><br>
<br>
The function is never implemented for raven on linux.<br>
It follows similair implementation as on windows.<br>
<br>
SMU still needs to notify SMC and copy WM table, which is added<br>
here. But on other Asics such as Vega this step is not implemented.<br>
<br>
Signed-off-by: Mikita Lipski <mikita.lipski@amd.com><br>
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com><br>
---<br>
drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c | 13 +++++++++++++<br>
drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.h | 1 +<br>
2 files changed, 14 insertions(+)<br>
<br>
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c<br>
index 6ba3b1f..b712d16 100644<br>
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c<br>
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c<br>
@@ -992,6 +992,18 @@ static int smu10_read_sensor(struct pp_hwmgr *hwmgr, int idx,<br>
return ret;<br>
}<br>
<br>
+static int smu10_set_watermarks_for_clocks_ranges(struct pp_hwmgr *hwmgr,<br>
+ struct pp_wm_sets_with_clock_ranges_soc15 *wm_with_clock_ranges)<br>
+{<br>
+ struct smu10_hwmgr *data = hwmgr->backend;<br>
+ Watermarks_t *table = &(data->water_marks_table);<br>
+ int result = 0;<br>
+<br>
+ smu_set_watermarks_for_clocks_ranges(table,wm_with_clock_ranges);<br>
+ smum_smc_table_manager(hwmgr, (uint8_t *)table, (uint16_t)SMU10_WMTABLE, false);<br>
+ data->water_marks_exist = true;<br>
+ return result;<br>
+}<br>
static int smu10_set_mmhub_powergating_by_smu(struct pp_hwmgr *hwmgr)<br>
{<br>
return smum_send_msg_to_smc(hwmgr, PPSMC_MSG_PowerGateMmHub);<br>
@@ -1021,6 +1033,7 @@ static const struct pp_hwmgr_func smu10_hwmgr_funcs = {<br>
.get_current_shallow_sleep_clocks = smu10_get_current_shallow_sleep_clocks,<br>
.get_clock_by_type_with_latency = smu10_get_clock_by_type_with_latency,<br>
.get_clock_by_type_with_voltage = smu10_get_clock_by_type_with_voltage,<br>
+ .set_watermarks_for_clocks_ranges = smu10_set_watermarks_for_clocks_ranges,<br>
.get_max_high_clocks = smu10_get_max_high_clocks,<br>
.read_sensor = smu10_read_sensor,<br>
.set_active_display_count = smu10_set_active_display_count,<br>
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.h b/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.h<br>
index 175c3a5..f68b218 100644<br>
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.h<br>
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.h<br>
@@ -290,6 +290,7 @@ struct smu10_hwmgr {<br>
bool vcn_dpg_mode;<br>
<br>
bool gfx_off_controled_by_driver;<br>
+ bool water_marks_exist;<br>
Watermarks_t water_marks_table;<br>
struct smu10_clock_voltage_information clock_vol_info;<br>
DpmClocks_t clock_table;<br>
-- <br>
2.7.4<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>