Skip to contentSkip to conversation

drm/amdgpu: set default temperature range

PATCH New Satyajit Sahu 1 participant 1 message Dec 11, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: set default temperature range

Setting default values for min and maxi threshold temperatures. Hwmgr can override these values if it has necessary tables.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 4 ++++
 drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.h | 3 +++
 2 files changed, 7 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c +4 -0
index 5f5aa5f..86c4fd5 100644
@@ -148,6 +148,10 @@ static int amdgpu_pp_hw_init(void *handle)
 	if (adev->firmware.load_type == AMDGPU_FW_LOAD_SMU)
 		amdgpu_ucode_init_bo(adev);
 
+	/* Setting default min and max temperature */
+	adev->pm.dpm.thermal.min_temp = MIN_TEMP;
+	adev->pm.dpm.thermal.max_temp = MAX_TEMP;
+
 	if (adev->powerplay.ip_funcs->hw_init)
 		ret = adev->powerplay.ip_funcs->hw_init(
 					adev->powerplay.pp_handle);
drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.h +3 -0
index c0c4bfd..ebc584d 100644
@@ -28,6 +28,9 @@
 
 #include "amd_shared.h"
 
+#define MIN_TEMP 0
+#define MAX_TEMP 95
+
 extern const struct amdgpu_ip_block_version amdgpu_pp_ip_block;
 
 #endif /* __AMDGPU_POWERPLAY_H__ */
Signature · 6 lines
1.9.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx