summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c4
-rw-r--r--sys/dev/pci/drm/amd/powerplay/inc/hwmgr.h1
-rw-r--r--sys/dev/pci/drm/amd/powerplay/smumgr/polaris10_smumgr.c4
3 files changed, 8 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c b/sys/dev/pci/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c
index 4e1fd539384..fbbd5a4877e 100644
--- a/sys/dev/pci/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c
+++ b/sys/dev/pci/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c
@@ -916,8 +916,10 @@ static int init_thermal_controller(
PHM_PlatformCaps_ThermalController
);
- if (0 == powerplay_table->usFanTableOffset)
+ if (0 == powerplay_table->usFanTableOffset) {
+ hwmgr->thermal_controller.use_hw_fan_control = 1;
return 0;
+ }
fan_table = (const PPTable_Generic_SubTable_Header *)
(((unsigned long)powerplay_table) +
diff --git a/sys/dev/pci/drm/amd/powerplay/inc/hwmgr.h b/sys/dev/pci/drm/amd/powerplay/inc/hwmgr.h
index ef14644efe9..9aa75f62aad 100644
--- a/sys/dev/pci/drm/amd/powerplay/inc/hwmgr.h
+++ b/sys/dev/pci/drm/amd/powerplay/inc/hwmgr.h
@@ -677,6 +677,7 @@ struct pp_thermal_controller_info {
uint8_t ucType;
uint8_t ucI2cLine;
uint8_t ucI2cAddress;
+ uint8_t use_hw_fan_control;
struct pp_fan_info fanInfo;
struct pp_advance_fan_control_parameters advanceFanControlParameters;
};
diff --git a/sys/dev/pci/drm/amd/powerplay/smumgr/polaris10_smumgr.c b/sys/dev/pci/drm/amd/powerplay/smumgr/polaris10_smumgr.c
index 45629f26dbc..0dbca386585 100644
--- a/sys/dev/pci/drm/amd/powerplay/smumgr/polaris10_smumgr.c
+++ b/sys/dev/pci/drm/amd/powerplay/smumgr/polaris10_smumgr.c
@@ -2038,6 +2038,10 @@ static int polaris10_thermal_setup_fan_table(struct pp_hwmgr *hwmgr)
return 0;
}
+ /* use hardware fan control */
+ if (hwmgr->thermal_controller.use_hw_fan_control)
+ return 0;
+
tmp64 = hwmgr->thermal_controller.advanceFanControlParameters.
usPWMMin * duty100;
do_div(tmp64, 10000);