<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
{margin-top:0;
margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" style="font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif">
<p></p>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px">Hi <span style="color:rgb(33,33,33); font-size:13.3333px"> </span><span class="x_highlight" id="x_0.08610139903612435" name="x_searchHitInReadingPane" style="color:rgb(33,33,33); font-size:13.3333px">Alex</span><span style="color:rgb(33,33,33); font-size:13.3333px">andre,</span></p>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px"><span style="color:rgb(33,33,33); font-size:13.3333px"><br>
</span></p>
<p style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:16px"><span style="color:rgb(33,33,33); font-size:13.3333px">I have applied this patch, I will generate a new patch to fix the typos as you mentioned.</span></p>
<br>
<p></p>
<p>Thanks for your review.</p>
<p><br>
</p>
<p>Best Regards</p>
<p>Rex</p>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> Alexandre Demers <alexandre.f.demers@gmail.com><br>
<b>Sent:</b> Thursday, July 7, 2016 12:49:53 PM<br>
<b>To:</b> Zhu, Rex<br>
<b>Cc:</b> amd-gfx@lists.freedesktop.org<br>
<b>Subject:</b> Re: [PATCH 3/6] drm/amd/powerplay: fix bug that get wrong polaris evv voltage.</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Small suggestion below while at it if it was not applied yet.<br>
<br>
Alexandre Demers<br>
<br>
On 2016-07-05 05:48, Rex Zhu wrote:<br>
> Change-Id: Ied43d26e1b90d8d9cd6ab5ea4ab432791b48bd84<br>
> Signed-off-by: Rex Zhu <Rex.Zhu@amd.com><br>
> Reviewed-by: Ken Wang <Qingqing.Wang@amd.com><br>
> ---<br>
> drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c | 7 ++++---<br>
> drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c | 4 ++--<br>
> drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.h | 2 +-<br>
> 3 files changed, 7 insertions(+), 6 deletions(-)<br>
><br>
> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c<br>
> index baa371f..a42610ee 100644<br>
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c<br>
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/polaris10_hwmgr.c<br>
> @@ -2878,7 +2878,7 @@ static int polaris10_get_evv_voltages(struct pp_hwmgr *hwmgr)<br>
> {<br>
> struct polaris10_hwmgr *data = (struct polaris10_hwmgr *)(hwmgr->backend);<br>
> uint16_t vv_id;<br>
> - uint16_t vddc = 0;<br>
> + uint32_t vddc = 0;<br>
> uint16_t i, j;<br>
> uint32_t sclk = 0;<br>
> struct phm_ppt_v1_information *table_info =<br>
> @@ -2909,8 +2909,9 @@ static int polaris10_get_evv_voltages(struct pp_hwmgr *hwmgr)<br>
> continue);<br>
> <br>
> <br>
> - /* need to make sure vddc is less than 2v or else, it could burn the ASIC. */<br>
> - PP_ASSERT_WITH_CODE((vddc < 2000 && vddc != 0),<br>
> + /* need to make sure vddc is less than 2v or else, it could burn the ASIC.<br>
> + * real voltage level in unit of 0.01mv */<br>
Could you fix the volt and millivolt symbols here while you're at it? <br>
They should be "V" and "mV" respectively. Thanks.<br>
<br>
> + PP_ASSERT_WITH_CODE((vddc < 200000 && vddc != 0),<br>
> "Invalid VDDC value", result = -EINVAL;);<br>
> <br>
> /* the voltage should not be zero nor equal to leakage ID */<br>
> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c b/drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c<br>
> index 5d70e2c..a64db7b 100644<br>
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c<br>
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.c<br>
> @@ -1256,7 +1256,7 @@ int atomctrl_set_ac_timing_ai(struct pp_hwmgr *hwmgr, uint32_t memory_clock,<br>
> }<br>
> <br>
> int atomctrl_get_voltage_evv_on_sclk_ai(struct pp_hwmgr *hwmgr, uint8_t voltage_type,<br>
> - uint32_t sclk, uint16_t virtual_voltage_Id, uint16_t *voltage)<br>
> + uint32_t sclk, uint16_t virtual_voltage_Id, uint32_t *voltage)<br>
> {<br>
> <br>
> int result;<br>
> @@ -1274,7 +1274,7 @@ int atomctrl_get_voltage_evv_on_sclk_ai(struct pp_hwmgr *hwmgr, uint8_t voltage_<br>
> if (0 != result)<br>
> return result;<br>
> <br>
> - *voltage = get_voltage_info_param_space.usVoltageLevel;<br>
> + *voltage = ((GET_EVV_VOLTAGE_INFO_OUTPUT_PARAMETER_V1_3 *)(&get_voltage_info_param_space))->ulVoltageLevel;<br>
> <br>
> return result;<br>
> }<br>
> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.h b/drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.h<br>
> index 248c5db..1e35a96 100644<br>
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.h<br>
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/ppatomctrl.h<br>
> @@ -305,7 +305,7 @@ extern int atomctrl_get_engine_pll_dividers_ai(struct pp_hwmgr *hwmgr, uint32_t<br>
> extern int atomctrl_set_ac_timing_ai(struct pp_hwmgr *hwmgr, uint32_t memory_clock,<br>
> uint8_t level);<br>
> extern int atomctrl_get_voltage_evv_on_sclk_ai(struct pp_hwmgr *hwmgr, uint8_t voltage_type,<br>
> - uint32_t sclk, uint16_t virtual_voltage_Id, uint16_t *voltage);<br>
> + uint32_t sclk, uint16_t virtual_voltage_Id, uint32_t *voltage);<br>
> extern int atomctrl_get_smc_sclk_range_table(struct pp_hwmgr *hwmgr, struct pp_atom_ctrl_sclk_range_table *table);<br>
> <br>
> extern int atomctrl_get_avfs_information(struct pp_hwmgr *hwmgr, struct pp_atom_ctrl__avfs_parameters *param);<br>
<br>
</div>
</span></font>
</body>
</html>