[PATCH 1/3] drm/amd/powerplay: retrieve correct minimum RPM speed by MinPWM

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

 



Retrieve the correct minimum RPM speed for Vega20. And MinPWM
is needed to recalculate the MinRPM on maximum RPM speed change.

Change-Id: I552bd8ada74b0336257ea1a10c004b5211acc36f
Signed-off-by: Evan Quan <evan.quan@xxxxxxx>
---
 drivers/gpu/drm/amd/powerplay/hwmgr/vega20_processpptables.c | 4 +++-
 drivers/gpu/drm/amd/powerplay/inc/hwmgr.h                    | 1 +
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_processpptables.c b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_processpptables.c
index f7e8bbdc20b0..7170fb36b67a 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_processpptables.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/vega20_processpptables.c
@@ -805,7 +805,9 @@ static int init_powerplay_table_information(
 
 	hwmgr->thermal_controller.ucType = powerplay_table->ucThermalControllerType;
 	pptable_information->uc_thermal_controller_type = powerplay_table->ucThermalControllerType;
-	hwmgr->thermal_controller.fanInfo.ulMinRPM = 0;
+	hwmgr->thermal_controller.fanInfo.ulMinPWM = powerplay_table->smcPPTable.FanPwmMin;
+	hwmgr->thermal_controller.fanInfo.ulMinRPM = (powerplay_table->smcPPTable.FanPwmMin *
+		powerplay_table->smcPPTable.FanMaximumRpm) / 255;
 	hwmgr->thermal_controller.fanInfo.ulMaxRPM = powerplay_table->smcPPTable.FanMaximumRpm;
 
 	set_hw_cap(hwmgr,
diff --git a/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h b/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h
index e5a60aa44b5d..687f73fe4cf5 100644
--- a/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h
+++ b/drivers/gpu/drm/amd/powerplay/inc/hwmgr.h
@@ -628,6 +628,7 @@ struct pp_fan_info {
 	uint8_t   ucTachometerPulsesPerRevolution;
 	uint32_t   ulMinRPM;
 	uint32_t   ulMaxRPM;
+	uint32_t   ulMinPWM;
 };
 
 struct pp_advance_fan_control_parameters {
-- 
2.19.1

_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
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