FreeBSD Bugzilla – Attachment 169882 Details for
Bug 209202
[powermac_thermal] In-Kernel PowerMac fan control does not effectively regulate some quad core models
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to add additional temp level and longer hysteresis to PowerMac thermal management
pmac_thermal.patch (text/plain), 2.71 KB, created by
gmbroome
on 2016-05-02 14:44:13 UTC
(
hide
)
Description:
Patch to add additional temp level and longer hysteresis to PowerMac thermal management
Filename:
MIME Type:
Creator:
gmbroome
Created:
2016-05-02 14:44:13 UTC
Size:
2.71 KB
patch
obsolete
>diff --git a/sys/powerpc/powermac/powermac_thermal.c b/sys/powerpc/powermac/powermac_thermal.c >index 250c9f0..725482b 100644 >--- a/sys/powerpc/powermac/powermac_thermal.c >+++ b/sys/powerpc/powermac/powermac_thermal.c >@@ -43,7 +43,7 @@ __FBSDID("$FreeBSD$"); > #include "powermac_thermal.h" > > /* A 10 second timer for spinning down fans. */ >-#define FAN_HYSTERESIS_TIMER 10 >+#define FAN_HYSTERESIS_TIMER 30 > > static void fan_management_proc(void); > static void pmac_therm_manage_fans(void); >@@ -143,10 +143,10 @@ pmac_therm_manage_fans(void) > average_excess = max_excess_zone = 0; > SLIST_FOREACH(sensor, &sensors, entries) { > temp = imin(sensor->last_val, >- sensor->sensor->max_temp); >+ sensor->sensor->high_temp); > frac_excess = (temp - > sensor->sensor->target_temp)*100 / >- (sensor->sensor->max_temp - temp + 1); >+ (sensor->sensor->high_temp - temp + 1); > if (frac_excess < 0) > frac_excess = 0; > if (sensor->sensor->zone == fan->fan->zone) { >diff --git a/sys/powerpc/powermac/powermac_thermal.h b/sys/powerpc/powermac/powermac_thermal.h >index 424c612..1059f95 100644 >--- a/sys/powerpc/powermac/powermac_thermal.h >+++ b/sys/powerpc/powermac/powermac_thermal.h >@@ -42,7 +42,7 @@ struct pmac_fan { > }; > > struct pmac_therm { >- int target_temp, max_temp; /* Tenths of a degree K */ >+ int target_temp, high_temp, max_temp; /* Tenths of a degree K */ > > char name[32]; > int zone; >diff --git a/sys/powerpc/powermac/smu.c b/sys/powerpc/powermac/smu.c >index cbc0e35..d7c9db7 100644 >--- a/sys/powerpc/powermac/smu.c >+++ b/sys/powerpc/powermac/smu.c >@@ -1245,8 +1245,9 @@ smu_attach_sensors(device_t dev, phandle_t sensroot) > > if (sens->type == SMU_TEMP_SENSOR) { > /* Make up some numbers */ >- sens->therm.target_temp = 500 + 2732; /* 50 C */ >- sens->therm.max_temp = 900 + 2732; /* 90 C */ >+ sens->therm.target_temp = 400 + 2732; /* 40 C */ >+ sens->therm.high_temp = 750 + 2732; /* 75 C */ >+ sens->therm.max_temp = 950 + 2732; /* 95 C */ > > sens->therm.read = > (int (*)(struct pmac_therm *))smu_sensor_read; >diff --git a/sys/powerpc/powermac/smusat.c b/sys/powerpc/powermac/smusat.c >index 2e37ae4..5dbb73c 100644 >--- a/sys/powerpc/powermac/smusat.c >+++ b/sys/powerpc/powermac/smusat.c >@@ -184,8 +184,9 @@ smusat_attach(device_t dev) > > if (sens->type == SMU_TEMP_SENSOR) { > /* Make up some numbers */ >- sens->therm.target_temp = 500 + 2732; /* 50 C */ >- sens->therm.max_temp = 900 + 2732; /* 90 C */ >+ sens->therm.target_temp = 400 + 2732; /* 40 C */ >+ sens->therm.high_temp = 750 + 2732; /* 75 C */ >+ sens->therm.max_temp = 950 + 2732; /* 95 C */ > sens->therm.read = > (int (*)(struct pmac_therm *))smusat_sensor_read; > pmac_thermal_sensor_register(&sens->therm);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 209202
: 169882