drm/amd/powerplay: use hardware fan control if no powerplay fan table
Subsystems (2)
PATCH 1/1 drm/amd/powerplay: use hardware fan control if no powerplay fan table
Use SMC default fan table if no external powerplay fan table.
--- drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c | 4 +++- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 1 + drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 4 ++++ 3 files changed, 8 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c +3 -1
@@ -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) +
drivers/gpu/drm/amd/powerplay/inc/hwmgr.h +1 -0
@@ -697,6 +697,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; };
drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c +4 -0
@@ -2092,6 +2092,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 );
Signature · 6 lines
2.21.0 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): [email protected]
Alex Deucher
Reviewed-byQuoted 2 lines · Evan Quan
Use SMC default fan table if no external powerplay fan table.
Maybe add a line saying you may get errors if the table is empty and you try and use it. With that,
Quoted 55 lines
Change-Id Icd7467a7fc5287a92945ba0fcc19699192b1683aSigned-off-by Evan Quan <[email protected]>--- drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c | 4 +++- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 1 + drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 4 ++++ 3 files changed, 8 insertions(+), 1 deletion(-)drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c +3
-1@@ -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) +drivers/gpu/drm/amd/powerplay/inc/hwmgr.h +1
-0@@ -697,6 +697,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; };drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c +4
-1@@ -2092,6 +2092,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 ); --2.21.0
Quoted 4 lines
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
________________________________
From: amd-gfx <amd-gfx-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org> on behalf of Evan Quan <[email protected]>
Sent: Thursday, June 27, 2019 11:15:29 PM
To: [email protected]
Cc: Quan, Evan
Subject: [PATCH] drm/amd/powerplay: use hardware fan control if no powerplay fan table
Use SMC default fan table if no external powerplay fan table.
--- drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c | 4 +++- drivers/gpu/drm/amd/powerplay/inc/hwmgr.h | 1 + drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 4 ++++ 3 files changed, 8 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/powerplay/hwmgr/process_pptables_v1_0.c +3 -1
@@ -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) +
drivers/gpu/drm/amd/powerplay/inc/hwmgr.h +1 -0
@@ -697,6 +697,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; };
drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c +4 -0
@@ -2092,6 +2092,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 );
--
2.21.0
_______________________________________________
amd-gfx mailing list [email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx