[PATCH 5/7] drm/amd/powerplay: export vega10 specific thermal ranges

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 3, 2018 at 9:25 PM, Quan, Evan <Evan.Quan at amd.com> wrote:
> Not typo. It shares the SMU7 structure.

If all of these parts use the same values, can we just add it to some
common place?  Also, all of these can be const I think.

Alex

>
> Regards,
> Evan
>>-----Original Message-----
>>From: Alex Deucher [mailto:alexdeucher at gmail.com]
>>Sent: Thursday, January 04, 2018 4:18 AM
>>To: Quan, Evan <Evan.Quan at amd.com>
>>Cc: amd-gfx list <amd-gfx at lists.freedesktop.org>; Deucher, Alexander
>><Alexander.Deucher at amd.com>
>>Subject: Re: [PATCH 5/7] drm/amd/powerplay: export vega10 specific thermal ranges
>>
>>On Wed, Jan 3, 2018 at 3:16 PM, Alex Deucher <alexdeucher at gmail.com> wrote:
>>> On Tue, Jan 2, 2018 at 10:15 PM, Evan Quan <evan.quan at amd.com> wrote:
>>>> Change-Id: If240a45dd2538e93185802b1fce54fd83de89de0
>>>> Signed-off-by: Evan Quan <evan.quan at amd.com>
>>>> ---
>>>>  drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c | 21
>>+++++++++++++++++++++
>>>>  1 file changed, 21 insertions(+)
>>>>
>>>> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c
>>b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c
>>>> index 2d55dab..ed16468 100644
>>>> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c
>>>> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega10_hwmgr.c
>>>> @@ -4988,6 +4988,26 @@ static int vega10_notify_cac_buffer_info(struct pp_hwmgr
>>*hwmgr,
>>>>         return 0;
>>>>  }
>>>>
>>>> +static struct PP_TemperatureRange SMU7ThermalWithDelayPolicy[] =
>>>
>>> Copy paste typo?  s/SMU7/vega10/?
>>
>>With that fixed:
>>Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
>>
>>>
>>> Alex
>>>
>>>> +{
>>>> +       {-273150,  99000},
>>>> +       { 120000, 120000},
>>>> +};
>>>> +
>>>> +static int vega10_get_thermal_temperature_range(struct pp_hwmgr *hwmgr,
>>>> +               struct PP_TemperatureRange *thermal_data)
>>>> +{
>>>> +       struct phm_ppt_v2_information *table_info =
>>>> +                       (struct phm_ppt_v2_information *)hwmgr->pptable;
>>>> +
>>>> +       memcpy(thermal_data, &SMU7ThermalWithDelayPolicy[0], sizeof(struct
>>PP_TemperatureRange));
>>>> +
>>>> +       thermal_data->max = table_info->tdp_table->usSoftwareShutdownTemp *
>>>> +               PP_TEMPERATURE_UNITS_PER_CENTIGRADES;
>>>> +
>>>> +       return 0;
>>>> +}
>>>> +
>>>>  static int vega10_register_thermal_interrupt(struct pp_hwmgr *hwmgr,
>>>>                 const void *info)
>>>>  {
>>>> @@ -5074,6 +5094,7 @@ static const struct pp_hwmgr_func vega10_hwmgr_funcs = {
>>>>         .set_mclk_od = vega10_set_mclk_od,
>>>>         .avfs_control = vega10_avfs_enable,
>>>>         .notify_cac_buffer_info = vega10_notify_cac_buffer_info,
>>>> +       .get_thermal_temperature_range = vega10_get_thermal_temperature_range,
>>>>         .register_internal_thermal_interrupt = vega10_register_thermal_interrupt,
>>>>         .start_thermal_controller = vega10_start_thermal_controller,
>>>>  };
>>>> --
>>>> 2.7.4
>>>>
>>>> _______________________________________________
>>>> amd-gfx mailing list
>>>> amd-gfx at lists.freedesktop.org
>>>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux