<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<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">Hi Alex,</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0"><span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 14.6667px;">Mikita's patch was still not
in </span><span style="font-size: 14.6667px;">drm-next.</span></p>
<p style="margin-top:0;margin-bottom:0"><span style="font-size: 14.6667px;">I reviewed the interfaces between powerplay and display.</span></p>
<p style="margin-top:0;margin-bottom:0"><span style="font-size: 14.6667px;">Most of them were still not implemented. so the services powerplay exported to dc will not be called. </span></p>
<p style="margin-top:0;margin-bottom:0"><span style="font-size: 14.6667px;">I tried to implement them. </span></p>
<p style="margin-top:0;margin-bottom:0"><span style="font-size: 14.6667px;">and then we can try to test the strutter mode on raven in linux.</span></p>
<p style="margin-top:0;margin-bottom:0"><span style="font-size: 14.6667px;"><br>
</span></p>
<p style="margin-top:0;margin-bottom:0"><span style="font-size: 14.6667px;">Best Regards</span></p>
<p style="margin-top:0;margin-bottom:0"><span style="font-size: 14.6667px;">Rex</span></p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<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> Alex Deucher <alexdeucher@gmail.com><br>
<b>Sent:</b> Wednesday, June 20, 2018 11:47 AM<br>
<b>To:</b> Wentland, Harry<br>
<b>Cc:</b> amd-gfx list; Wu, Hersen; Lipski, Mikita; Laktyushkin, Dmytro; Zhu, Rex<br>
<b>Subject:</b> Re: [PATCH 2/5] drm/amd/pp: Fix wrong clock-unit exported to Display</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">On Tue, Jun 19, 2018 at 5:17 PM, Harry Wentland <harry.wentland@amd.com> wrote:<br>
> From: Rex Zhu <Rex.Zhu@amd.com><br>
><br>
> Transfer 10KHz (requested by smu) to KHz needed by Display<br>
> component.<br>
><br>
> This can fix the issue 4k Monitor can't be lit up on Vega/Raven.<br>
><br>
> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com><br>
> Acked-by: Alex Deucher <alexander.deucher@amd.com><br>
<br>
Need to make sure we drop Mikita's patch if we apply this one<br>
otherwise the clocks will be wrong again.<br>
<br>
Alex<br>
<br>
> ---<br>
> drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c | 4 ++--<br>
> drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 10 +++++-----<br>
> drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c | 10 +++++-----<br>
> 3 files changed, 12 insertions(+), 12 deletions(-)<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 d4bc83e81389..c905df42adc5 100644<br>
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c<br>
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu10_hwmgr.c<br>
> @@ -993,7 +993,7 @@ static int smu10_get_clock_by_type_with_latency(struct pp_hwmgr *hwmgr,<br>
><br>
> clocks->num_levels = 0;<br>
> for (i = 0; i < pclk_vol_table->count; i++) {<br>
> - clocks->data[i].clocks_in_khz = pclk_vol_table->entries[i].clk;<br>
> + clocks->data[i].clocks_in_khz = pclk_vol_table->entries[i].clk * 10;<br>
> clocks->data[i].latency_in_us = latency_required ?<br>
> smu10_get_mem_latency(hwmgr,<br>
> pclk_vol_table->entries[i].clk) :<br>
> @@ -1044,7 +1044,7 @@ static int smu10_get_clock_by_type_with_voltage(struct pp_hwmgr *hwmgr,<br>
><br>
> clocks->num_levels = 0;<br>
> for (i = 0; i < pclk_vol_table->count; i++) {<br>
> - clocks->data[i].clocks_in_khz = pclk_vol_table->entries[i].clk;<br>
> + clocks->data[i].clocks_in_khz = pclk_vol_table->entries[i].clk * 10;<br>
> clocks->data[i].voltage_in_mv = pclk_vol_table->entries[i].vol;<br>
> clocks->num_levels++;<br>
> }<br>
> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c<br>
> index 3b8d36df52e9..e9a8b527d481 100644<br>
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c<br>
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c<br>
> @@ -4067,7 +4067,7 @@ static void vega10_get_sclks(struct pp_hwmgr *hwmgr,<br>
> for (i = 0; i < dep_table->count; i++) {<br>
> if (dep_table->entries[i].clk) {<br>
> clocks->data[clocks->num_levels].clocks_in_khz =<br>
> - dep_table->entries[i].clk;<br>
> + dep_table->entries[i].clk * 10;<br>
> clocks->num_levels++;<br>
> }<br>
> }<br>
> @@ -4104,7 +4104,7 @@ static void vega10_get_memclocks(struct pp_hwmgr *hwmgr,<br>
> clocks->data[clocks->num_levels].clocks_in_khz =<br>
> data->mclk_latency_table.entries<br>
> [data->mclk_latency_table.count].frequency =<br>
> - dep_table->entries[i].clk;<br>
> + dep_table->entries[i].clk * 10;<br>
> clocks->data[clocks->num_levels].latency_in_us =<br>
> data->mclk_latency_table.entries<br>
> [data->mclk_latency_table.count].latency =<br>
> @@ -4126,7 +4126,7 @@ static void vega10_get_dcefclocks(struct pp_hwmgr *hwmgr,<br>
> uint32_t i;<br>
><br>
> for (i = 0; i < dep_table->count; i++) {<br>
> - clocks->data[i].clocks_in_khz = dep_table->entries[i].clk;<br>
> + clocks->data[i].clocks_in_khz = dep_table->entries[i].clk * 10;<br>
> clocks->data[i].latency_in_us = 0;<br>
> clocks->num_levels++;<br>
> }<br>
> @@ -4142,7 +4142,7 @@ static void vega10_get_socclocks(struct pp_hwmgr *hwmgr,<br>
> uint32_t i;<br>
><br>
> for (i = 0; i < dep_table->count; i++) {<br>
> - clocks->data[i].clocks_in_khz = dep_table->entries[i].clk;<br>
> + clocks->data[i].clocks_in_khz = dep_table->entries[i].clk * 10;<br>
> clocks->data[i].latency_in_us = 0;<br>
> clocks->num_levels++;<br>
> }<br>
> @@ -4202,7 +4202,7 @@ static int vega10_get_clock_by_type_with_voltage(struct pp_hwmgr *hwmgr,<br>
> }<br>
><br>
> for (i = 0; i < dep_table->count; i++) {<br>
> - clocks->data[i].clocks_in_khz = dep_table->entries[i].clk;<br>
> + clocks->data[i].clocks_in_khz = dep_table->entries[i].clk * 10;<br>
> clocks->data[i].voltage_in_mv = (uint32_t)(table_info->vddc_lookup_table-><br>
> entries[dep_table->entries[i].vddInd].us_vdd);<br>
> clocks->num_levels++;<br>
> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c<br>
> index 782e2098824d..d685ce7f88cc 100644<br>
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c<br>
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega12_hwmgr.c<br>
> @@ -1576,7 +1576,7 @@ static int vega12_get_sclks(struct pp_hwmgr *hwmgr,<br>
><br>
> for (i = 0; i < ucount; i++) {<br>
> clocks->data[i].clocks_in_khz =<br>
> - dpm_table->dpm_levels[i].value * 100;<br>
> + dpm_table->dpm_levels[i].value * 1000;<br>
><br>
> clocks->data[i].latency_in_us = 0;<br>
> }<br>
> @@ -1608,7 +1608,7 @@ static int vega12_get_memclocks(struct pp_hwmgr *hwmgr,<br>
><br>
> for (i = 0; i < ucount; i++) {<br>
> clocks->data[i].clocks_in_khz =<br>
> - dpm_table->dpm_levels[i].value * 100;<br>
> + dpm_table->dpm_levels[i].value * 1000;<br>
><br>
> clocks->data[i].latency_in_us =<br>
> data->mclk_latency_table.entries[i].latency =<br>
> @@ -1638,7 +1638,7 @@ static int vega12_get_dcefclocks(struct pp_hwmgr *hwmgr,<br>
><br>
> for (i = 0; i < ucount; i++) {<br>
> clocks->data[i].clocks_in_khz =<br>
> - dpm_table->dpm_levels[i].value * 100;<br>
> + dpm_table->dpm_levels[i].value * 1000;<br>
><br>
> clocks->data[i].latency_in_us = 0;<br>
> }<br>
> @@ -1666,7 +1666,7 @@ static int vega12_get_socclocks(struct pp_hwmgr *hwmgr,<br>
><br>
> for (i = 0; i < ucount; i++) {<br>
> clocks->data[i].clocks_in_khz =<br>
> - dpm_table->dpm_levels[i].value * 100;<br>
> + dpm_table->dpm_levels[i].value * 1000;<br>
><br>
> clocks->data[i].latency_in_us = 0;<br>
> }<br>
> @@ -1838,7 +1838,7 @@ static int vega12_print_clock_levels(struct pp_hwmgr *hwmgr,<br>
> return -1);<br>
> for (i = 0; i < clocks.num_levels; i++)<br>
> size += sprintf(buf + size, "%d: %uMhz %s\n",<br>
> - i, clocks.data[i].clocks_in_khz / 100,<br>
> + i, clocks.data[i].clocks_in_khz / 1000,<br>
> (clocks.data[i].clocks_in_khz == now) ? "*" : "");<br>
> break;<br>
><br>
> --<br>
> 2.17.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" id="LPlnk927228" class="OWAAutoLink" previewremoved="true">
https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a>
<div id="LPBorder_GT_15295057893820.520890734800856" style="margin-bottom: 20px; overflow: auto; width: 100%; text-indent: 0px;">
<table id="LPContainer_15295057893790.06772176907544636" role="presentation" cellspacing="0" style="width: 90%; background-color: rgb(255, 255, 255); position: relative; overflow: auto; padding-top: 20px; padding-bottom: 20px; margin-top: 20px; border-top: 1px dotted rgb(200, 200, 200); border-bottom: 1px dotted rgb(200, 200, 200);">
<tbody>
<tr valign="top" style="border-spacing: 0px;">
<td id="TextCell_15295057893800.693914723348922" colspan="2" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;">
<div id="LPRemovePreviewContainer_15295057893800.503135221404194"></div>
<div id="LPTitle_15295057893800.6195114799967232" style="top: 0px; color: rgb(0, 120, 215); font-weight: normal; font-size: 21px; font-family: wf_segoe-ui_light, "Segoe UI Light", "Segoe WP Light", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; line-height: 21px;">
<a id="LPUrlAnchor_15295057893810.016334902970096987" href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx" target="_blank" style="text-decoration: none;">amd-gfx Info Page - freedesktop.org</a></div>
<div id="LPMetadata_15295057893810.8360543762338206" style="margin: 10px 0px 16px; color: rgb(102, 102, 102); font-weight: normal; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 14px;">
lists.freedesktop.org</div>
<div id="LPDescription_15295057893820.1655449087068177" style="display: block; color: rgb(102, 102, 102); font-weight: normal; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 20px; max-height: 100px; overflow: hidden;">
Subscribing to amd-gfx: Subscribe to amd-gfx by filling out the following form. Use of all freedesktop.org lists is subject to our Code of Conduct.</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<br>
</div>
</span></font></div>
</div>
</div>
</body>
</html>