<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-2022-jp">
</head>
<body>
when autowattman enabled,we will update uphyst/downhyst/min-sclk/mclk activity value to smu based on the workload.
<br>
<br>
Best Regards<br>
Rex<br>
<br>
<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> Wentland, Harry<br>
<b>Sent:</b> Thursday, February 8, 2018 10:22:16 PM<br>
<b>To:</b> Zhu, Rex; amd-gfx@lists.freedesktop.org<br>
<b>Subject:</b> Re: [PATCH] drm/amd/pp: Expose new interface to DC to ctrl auto wattman</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">On 2018-02-08 06:20 AM, Rex Zhu wrote:<br>
> Disable AutoWattman (if enabled) when FreeSync is enabled.<br>
<br>
Do you have a DC change calling this?<br>
<br>
What's the use case for this and why do we need to disable AutoWattman when Freesync is enabled?<br>
<br>
What does AutoWattman do?<br>
<br>
Harry<br>
<br>
> <br>
> Change-Id: I9a531321d7913b8b40e60070c569a01c4f202002<br>
> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com><br>
> ---<br>
> drivers/gpu/drm/amd/include/kgd_pp_interface.h | 1 +<br>
> drivers/gpu/drm/amd/powerplay/amd_powerplay.c | 25 +++++++++++++++++++++++++<br>
> 2 files changed, 26 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 22c2fa3..f7bb565 100644<br>
> --- a/drivers/gpu/drm/amd/include/kgd_pp_interface.h<br>
> +++ b/drivers/gpu/drm/amd/include/kgd_pp_interface.h<br>
> @@ -313,6 +313,7 @@ struct amd_pm_funcs {<br>
> int (*set_power_profile_mode)(void *handle, long *input, uint32_t size);<br>
> int (*odn_edit_dpm_table)(void *handle, uint32_t type, long *input, uint32_t size);<br>
> int (*set_mmhub_powergating_by_smu)(void *handle);<br>
> + int (*notify_free_sync_change)(void *handle, bool en);<br>
> };<br>
> <br>
> #endif<br>
> diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c<br>
> index 376ed2d..d0306b6 100644<br>
> --- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c<br>
> +++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c<br>
> @@ -1555,6 +1555,30 @@ static int pp_set_mmhub_powergating_by_smu(void *handle)<br>
> return hwmgr->hwmgr_func->set_mmhub_powergating_by_smu(hwmgr);<br>
> }<br>
> <br>
> +static int pp_notify_free_sync_change(void *handle, bool en)<br>
> +{<br>
> + struct pp_hwmgr *hwmgr;<br>
> + struct pp_instance *pp_handle = (struct pp_instance *)handle;<br>
> + int ret = 0;<br>
> +<br>
> + ret = pp_check(pp_handle);<br>
> +<br>
> + if (ret)<br>
> + return ret;<br>
> +<br>
> + hwmgr = pp_handle->hwmgr;<br>
> +<br>
> + mutex_lock(&pp_handle->pp_lock);<br>
> + if (hwmgr->autowattman_enabled) {<br>
> + if (hwmgr->hwmgr_func->start_auto_wattman != NULL) {<br>
> + if (!cancel_delayed_work_sync(&hwmgr->wattman_update_work))<br>
> + hwmgr->hwmgr_func->start_auto_wattman(hwmgr, en);<br>
> + }<br>
> + }<br>
> + mutex_unlock(&pp_handle->pp_lock);<br>
> + return 0;<br>
> +}<br>
> +<br>
> const struct amd_pm_funcs pp_dpm_funcs = {<br>
> .load_firmware = pp_dpm_load_fw,<br>
> .wait_for_fw_loading_complete = pp_dpm_fw_loading_complete,<br>
> @@ -1604,4 +1628,5 @@ static int pp_set_mmhub_powergating_by_smu(void *handle)<br>
> .display_clock_voltage_request = pp_display_clock_voltage_request,<br>
> .get_display_mode_validation_clocks = pp_get_display_mode_validation_clocks,<br>
> .set_mmhub_powergating_by_smu = pp_set_mmhub_powergating_by_smu,<br>
> + .notify_free_sync_change = pp_notify_free_sync_change,<br>
> };<br>
> <br>
</div>
</span></font></div>
</body>
</html>