<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"><font size="2"><span style="font-size:11pt;">>I don't think backend_init actually touches the hw anywhere else.<br>
>Seems like it might be better to move this to setup_asic_task for<br>
>consistency.</span></font><br>
</p>
<br>
<p style="margin-top:0;margin-bottom:0">Thanks Alex, you are right. the change for
<font size="2"><span style="font-size:11pt;">telemetry will cause <font size="2">
<span style="font-size:11pt;">telemetry</span></font> setting not restore after s3/s4 resume back.</span></font></p>
<p style="margin-top:0;margin-bottom:0"><font size="2"><span style="font-size:11pt;"><br>
</span></font></p>
<p style="margin-top:0;margin-bottom:0"><font size="2"><span style="font-size:11pt;">Best Regards</span></font></p>
<p style="margin-top:0;margin-bottom:0"><font size="2"><span style="font-size:11pt;">Rex</span></font><br>
</p>
<br>
<div style="color: rgb(0, 0, 0);">
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" color="#000000" face="Calibri, sans-serif"><b>From:</b> Alex Deucher <alexdeucher@gmail.com><br>
<b>Sent:</b> Friday, February 23, 2018 1:01 PM<br>
<b>To:</b> Zhu, Rex<br>
<b>Cc:</b> amd-gfx list<br>
<b>Subject:</b> Re: [PATCH] drm/amd/pp: Cleaning up vega10_enable_dpm_tasks function</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">On Thu, Feb 22, 2018 at 11:21 PM, Rex Zhu <Rex.Zhu@amd.com> wrote:<br>
> move out functions that unrelated to enable dpm task.<br>
><br>
> Change-Id: I93416e0eea82325040557a64af2b82a38d8c32ce<br>
> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com><br>
> ---<br>
>  drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 14 +++++---------<br>
>  drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.h |  1 -<br>
>  2 files changed, 5 insertions(+), 10 deletions(-)<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 b13f55d..c6cc6b2 100644<br>
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c<br>
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c<br>
> @@ -811,7 +811,8 @@ static int vega10_hwmgr_backend_init(struct pp_hwmgr *hwmgr)<br>
>                         data->vddci_control = VEGA10_VOLTAGE_CONTROL_BY_GPIO;<br>
>         }<br>
><br>
> -       data->config_telemetry = config_telemetry;<br>
> +       smum_send_msg_to_smc_with_parameter(hwmgr,<br>
> +               PPSMC_MSG_ConfigureTelemetry, config_telemetry);<br>
<br>
I don't think backend_init actually touches the hw anywhere else.<br>
Seems like it might be better to move this to setup_asic_task for<br>
consistency.<br>
<br>
Alex<br>
<br>
><br>
>         vega10_set_features_platform_caps(hwmgr);<br>
><br>
> @@ -928,6 +929,9 @@ static int vega10_setup_asic_task(struct pp_hwmgr *hwmgr)<br>
>                         "Failed to set up led dpm config!",<br>
>                         return -EINVAL);<br>
><br>
> +       smum_send_msg_to_smc_with_parameter(hwmgr,<br>
> +                       PPSMC_MSG_NumOfDisplays, 0);<br>
> +<br>
>         return 0;<br>
>  }<br>
><br>
> @@ -2853,16 +2857,8 @@ static int vega10_start_dpm(struct pp_hwmgr *hwmgr, uint32_t bitmap)<br>
><br>
>  static int vega10_enable_dpm_tasks(struct pp_hwmgr *hwmgr)<br>
>  {<br>
> -       struct vega10_hwmgr *data =<br>
> -                       (struct vega10_hwmgr *)(hwmgr->backend);<br>
>         int tmp_result, result = 0;<br>
><br>
> -       smum_send_msg_to_smc_with_parameter(hwmgr,<br>
> -               PPSMC_MSG_ConfigureTelemetry, data->config_telemetry);<br>
> -<br>
> -       smum_send_msg_to_smc_with_parameter(hwmgr,<br>
> -                       PPSMC_MSG_NumOfDisplays, 0);<br>
> -<br>
>         tmp_result = (!smum_is_dpm_running(hwmgr)) ? 0 : -1;<br>
>         PP_ASSERT_WITH_CODE(!tmp_result,<br>
>                         "DPM is already running right , skipping re-enablement!",<br>
> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.h b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.h<br>
> index ab3e879..df7999d 100644<br>
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.h<br>
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.h<br>
> @@ -380,7 +380,6 @@ struct vega10_hwmgr {<br>
>         struct smu_features            smu_features[GNLD_FEATURES_MAX];<br>
>         struct vega10_smc_state_table  smc_state_table;<br>
><br>
> -       uint32_t                       config_telemetry;<br>
>         uint32_t                       acg_loop_state;<br>
>         uint32_t                       mem_channels;<br>
>         uint8_t                       custom_profile_mode[4];<br>
> --<br>
> 1.9.1<br>
><br>
> _______________________________________________<br>
> amd-gfx mailing list<br>
> amd-gfx@lists.freedesktop.org<br>
> <a previewremoved="true" id="LPlnk581868" href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">
https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a>
<div style="margin-bottom: 20px; overflow: auto; width: 100%; text-indent: 0px;" id="LPBorder_GT_15193633579850.8452219915677441">
<table role="presentation" 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);" id="LPContainer_15193633579830.43468917679138286" cellspacing="0">
<tbody>
<tr style="border-spacing: 0px;" valign="top">
<td colspan="2" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;" id="TextCell_15193633579840.4384779857039953">
<div id="LPRemovePreviewContainer_15193633579840.9124738318741223"></div>
<div style="top: 0px; color: rgb(0, 120, 215); font-weight: 400; 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;" id="LPTitle_15193633579840.6865981313645956">
<a target="_blank" href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx" style="text-decoration: none;" id="LPUrlAnchor_15193633579840.2760762511591671">amd-gfx Info Page - freedesktop.org</a></div>
<div style="margin: 10px 0px 16px; color: rgb(102, 102, 102); font-weight: 400; font-family: "wf_segoe-ui_normal","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif; font-size: 14px; line-height: 14px;" id="LPMetadata_15193633579840.15709379421513125">
lists.freedesktop.org</div>
<div style="display: block; color: rgb(102, 102, 102); font-weight: 400; 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;" id="LPDescription_15193633579850.8907684278369051">
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 ...</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
</div>
</span></font></div>
</div>
</div>
</body>
</html>