[PATCH] drm/amdgpu: set default temperature range

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

 



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

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Satyajit Sahu <satyajit.sahu at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 4 ++++
 drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.h | 3 +++
 2 files changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c
index 5f5aa5f..86c4fd5 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c
@@ -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);
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.h
index c0c4bfd..ebc584d 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.h
@@ -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__ */
-- 
1.9.1



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux