[PATCH 4/7] drm/amd/powerplay: export thermal range through temp sysfs

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

 



On Tue, Jan 2, 2018 at 10:15 PM, Evan Quan <evan.quan at amd.com> wrote:
> Change-Id: I903ebb4d75ec0628e9720b6fee915c907e594613
> Signed-off-by: Evan Quan <evan.quan at amd.com>

Please include a commit message.  Something like:
Populate the hwmon temp range as part of thermal controller setup.
With that added:
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c
> index 297ec0d..84e1cb0 100644
> --- a/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c
> +++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hardwaremanager.c
> @@ -227,14 +227,21 @@ int phm_register_thermal_interrupt(struct pp_hwmgr *hwmgr, const void *info)
>  */
>  int phm_start_thermal_controller(struct pp_hwmgr *hwmgr)
>  {
> +       int ret = 0;
>         struct PP_TemperatureRange range = {{TEMP_RANGE_MIN, TEMP_RANGE_MAX}};
>
> +       if (hwmgr->hwmgr_func->get_thermal_temperature_range)
> +               hwmgr->hwmgr_func->get_thermal_temperature_range(
> +                               hwmgr, &range);
> +
>         if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
>                         PHM_PlatformCaps_ThermalController)
>                         && hwmgr->hwmgr_func->start_thermal_controller != NULL)
> -               return hwmgr->hwmgr_func->start_thermal_controller(hwmgr, &range);
> +               ret = hwmgr->hwmgr_func->start_thermal_controller(hwmgr, &range);
>
> -       return 0;
> +       cgs_set_temperature_range(hwmgr->device, range.min, range.max);
> +
> +       return ret;
>  }
>
>
> --
> 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