All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] drm/amd/powerplay: retrieve correct minimum RPM speed by MinPWM
@ 2018-10-24  8:11 Evan Quan
       [not found] ` <20181024081141.18647-1-evan.quan-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 9+ messages in thread
From: Evan Quan @ 2018-10-24  8:11 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Evan Quan

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@amd.com>
---
 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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-10-24  9:18 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-24  8:11 [PATCH 1/3] drm/amd/powerplay: retrieve correct minimum RPM speed by MinPWM Evan Quan
     [not found] ` <20181024081141.18647-1-evan.quan-5C7GfCeVMHo@public.gmane.org>
2018-10-24  8:11   ` [PATCH 2/3] drm/amd/powerplay: added hwmon interfaces for setting max/min fan speed Evan Quan
     [not found]     ` <20181024081141.18647-2-evan.quan-5C7GfCeVMHo@public.gmane.org>
2018-10-24  8:36       ` Zhu, Rex
     [not found]         ` <BYAPR12MB2775F650496C7DA583461501FBF60-ZGDeBxoHBPmJeBUhB162ZQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-10-24  8:47           ` Quan, Evan
     [not found]             ` <SN6PR12MB26563DA5F631ECD8A372CDE0E4F60-kxOKjb6HO/FeL/N0e1LXkAdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-10-24  9:04               ` Zhu, Rex
     [not found]                 ` <BYAPR12MB27756445D4157DD337C5B6B2FBF60-ZGDeBxoHBPmJeBUhB162ZQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-10-24  9:18                   ` Quan, Evan
2018-10-24  8:11   ` [PATCH 3/3] drm/amd/powerplay: support hwmon max/min fan speed setting on Vega20 Evan Quan
     [not found]     ` <20181024081141.18647-3-evan.quan-5C7GfCeVMHo@public.gmane.org>
2018-10-24  8:37       ` Zhu, Rex
     [not found]         ` <BYAPR12MB277564C5DF32AFE83E33F7D8FBF60-ZGDeBxoHBPmJeBUhB162ZQdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-10-24  8:53           ` Quan, Evan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.