|
11 | 11 | #include <stdbool.h> // bool 타입 추가 |
12 | 12 |
|
13 | 13 | #define GPU_TEMP_PATH "/sys/class/kgsl/kgsl-3d0/temp" |
14 | | -#define TEMP_THRESHOLD_MC 70000 // 70도 = 70000 millidegree C |
15 | | -#define TARGET_CPU_FREQ 1785600 |
| 14 | +#define TEMP_THRESHOLD_MC 60000 // 60도 = 60000 millidegree C |
| 15 | +#define TARGET_CPU_FREQ 960000 |
16 | 16 |
|
17 | 17 | // GPU 온도 읽기 (millidegree C) |
18 | 18 | static inline int read_gpu_temp() { |
@@ -94,14 +94,14 @@ static inline void thermal_control_check() { |
94 | 94 | if (temp_mc >= TEMP_THRESHOLD_MC && !throttled) { |
95 | 95 | set_cpu_freq(TARGET_CPU_FREQ); |
96 | 96 | throttled = true; |
97 | | - fprintf(stderr, "Thermal: GPU temp %.1f°C >= 70°C, throttling CPU to %d KHz\n", |
| 97 | + fprintf(stderr, "Thermal: GPU temp %.1f°C >= 60°C, throttling CPU to %d KHz\n", |
98 | 98 | temp_mc / 1000.0, TARGET_CPU_FREQ); |
99 | 99 | } |
100 | 100 | // 65도 이하로 내려가면 throttle 해제 (hysteresis) |
101 | 101 | else if (temp_mc < (TEMP_THRESHOLD_MC - 5000) && throttled) { |
102 | 102 | // 원하는 경우 여기서 원래 frequency로 복구 가능 |
103 | 103 | throttled = false; |
104 | | - fprintf(stderr, "Thermal: GPU temp %.1f°C < 65°C, releasing throttle\n", |
| 104 | + fprintf(stderr, "Thermal: GPU temp %.1f°C < 55°C, releasing throttle\n", |
105 | 105 | temp_mc / 1000.0); |
106 | 106 | } |
107 | 107 |
|
|
0 commit comments