mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-12 03:26:26 +00:00
drm/amd/powerplay: correct PP_TemperatureRange member type since negative values are part of the valid range
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>
This commit is contained in:
parent
39199b803b
commit
4ad9d4dd65
3 changed files with 6 additions and 6 deletions
|
@ -310,9 +310,9 @@ int smu7_thermal_get_temperature(struct pp_hwmgr *hwmgr)
|
||||||
static int smu7_thermal_set_temperature_range(struct pp_hwmgr *hwmgr,
|
static int smu7_thermal_set_temperature_range(struct pp_hwmgr *hwmgr,
|
||||||
uint32_t low_temp, uint32_t high_temp)
|
uint32_t low_temp, uint32_t high_temp)
|
||||||
{
|
{
|
||||||
uint32_t low = SMU7_THERMAL_MINIMUM_ALERT_TEMP *
|
int low = SMU7_THERMAL_MINIMUM_ALERT_TEMP *
|
||||||
PP_TEMPERATURE_UNITS_PER_CENTIGRADES;
|
PP_TEMPERATURE_UNITS_PER_CENTIGRADES;
|
||||||
uint32_t high = SMU7_THERMAL_MAXIMUM_ALERT_TEMP *
|
int high = SMU7_THERMAL_MAXIMUM_ALERT_TEMP *
|
||||||
PP_TEMPERATURE_UNITS_PER_CENTIGRADES;
|
PP_TEMPERATURE_UNITS_PER_CENTIGRADES;
|
||||||
|
|
||||||
if (low < low_temp)
|
if (low < low_temp)
|
||||||
|
|
|
@ -386,9 +386,9 @@ int vega10_thermal_get_temperature(struct pp_hwmgr *hwmgr)
|
||||||
static int vega10_thermal_set_temperature_range(struct pp_hwmgr *hwmgr,
|
static int vega10_thermal_set_temperature_range(struct pp_hwmgr *hwmgr,
|
||||||
struct PP_TemperatureRange *range)
|
struct PP_TemperatureRange *range)
|
||||||
{
|
{
|
||||||
uint32_t low = VEGA10_THERMAL_MINIMUM_ALERT_TEMP *
|
int low = VEGA10_THERMAL_MINIMUM_ALERT_TEMP *
|
||||||
PP_TEMPERATURE_UNITS_PER_CENTIGRADES;
|
PP_TEMPERATURE_UNITS_PER_CENTIGRADES;
|
||||||
uint32_t high = VEGA10_THERMAL_MAXIMUM_ALERT_TEMP *
|
int high = VEGA10_THERMAL_MAXIMUM_ALERT_TEMP *
|
||||||
PP_TEMPERATURE_UNITS_PER_CENTIGRADES;
|
PP_TEMPERATURE_UNITS_PER_CENTIGRADES;
|
||||||
uint32_t val, reg;
|
uint32_t val, reg;
|
||||||
|
|
||||||
|
|
|
@ -122,8 +122,8 @@ struct PP_StateSoftwareAlgorithmBlock {
|
||||||
* Type to hold a temperature range.
|
* Type to hold a temperature range.
|
||||||
*/
|
*/
|
||||||
struct PP_TemperatureRange {
|
struct PP_TemperatureRange {
|
||||||
uint32_t min;
|
int min;
|
||||||
uint32_t max;
|
int max;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct PP_StateValidationBlock {
|
struct PP_StateValidationBlock {
|
||||||
|
|
Loading…
Reference in a new issue