History log of /linux-master/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_thermal.c
Revision Date Author Comments
# b8e6aec1 29-Sep-2023 Mario Limonciello <mario.limonciello@amd.com>

drm/amd: Drop all hand-built MIN and MAX macros in the amdgpu base driver

Several files declare MIN() or MAX() macros that ignore the types of the
values being compared. Drop these macros and switch to min() min_t(),
and max() from `linux/minmax.h`.

Suggested-by: Hamza Mahfooz <Hamza.Mahfooz@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# cfc7d831 20-Jun-2023 Evan Quan <evan.quan@amd.com>

drm/amd/pm: fulfill the missing enablement for vega12/vega20 L2H and H2L interrupts

The feature mask bit was not correctly cleared. Without that, the L2H
and H2L interrupts cannot be enabled.

Signed-off-by: Evan Quan <evan.quan@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# 0d8318e1 09-Feb-2021 Evan Quan <evan.quan@amd.com>

drm/amd/pm: drop the unnecessary intermediate percent-based transition

Currently, the readout of fan speed pwm is transited into percent-based
and then pwm-based. However, the transition into percent-based is totally
unnecessary and make the final output less accurate.

Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# fb1f667e 08-Feb-2021 Evan Quan <evan.quan@amd.com>

drm/amd/pm: correct the fan speed PWM retrieving

The relationship "PWM = RPM / smu->fan_max_rpm" between fan speed
PWM and RPM is not true for SMU11 ASICs. So, we need a new way to
retrieving the fan speed PWM.

Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# 19744ada 26-Nov-2020 Lee Jones <lee.jones@linaro.org>

drm/amd/pm/powerplay/hwmgr/vega20_thermal: Fix some outdated function documentation

Fixes the following W=1 kernel build warning(s):

drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_thermal.c:217: warning: Function parameter or member 'hwmgr' not described in 'vega20_thermal_get_temperature'
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_thermal.c:242: warning: Function parameter or member 'hwmgr' not described in 'vega20_thermal_set_temperature_range'
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_thermal.c:242: warning: Function parameter or member 'range' not described in 'vega20_thermal_set_temperature_range'
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_thermal.c:278: warning: Function parameter or member 'hwmgr' not described in 'vega20_thermal_enable_alert'
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_thermal.c:296: warning: Function parameter or member 'hwmgr' not described in 'vega20_thermal_disable_alert'
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_thermal.c:310: warning: Function parameter or member 'hwmgr' not described in 'vega20_thermal_stop_thermal_controller'
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/vega20_thermal.c:326: warning: Function parameter or member 'hwmgr' not described in 'vega20_thermal_setup_fan_table'

Cc: Evan Quan <evan.quan@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: amd-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# 1887544d 24-Aug-2020 Evan Quan <evan.quan@amd.com>

drm/amd/pm: correct the thermal alert temperature limit settings

Do the maths in celsius degree. This can fix the issues caused
by the changes below:

drm/amd/pm: correct Vega20 swctf limit setting
drm/amd/pm: correct Vega12 swctf limit setting
drm/amd/pm: correct Vega10 swctf limit setting

Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Kenneth Feng <kenneth.feng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# bfcc0c16 20-Aug-2020 Evan Quan <evan.quan@amd.com>

drm/amd/pm: correct Vega20 swctf limit setting

Correct the Vega20 thermal swctf limit.

Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>


# e098bc96 13-Aug-2020 Evan Quan <evan.quan@amd.com>

drm/amd/pm: optimize the power related source code layout

The target is to provide a clear entry point(for power routines).
Also this can help to maintain a clear view about the frameworks
used on different ASICs. Hopefully all these can make power part
more friendly to play with.

Signed-off-by: Evan Quan <evan.quan@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>