diff options
author | Dan Murphy <dmurphy@ti.com> | 2011-11-26 10:47:24 +0800 |
---|---|---|
committer | Sebastien Jan <s-jan@ti.com> | 2011-11-28 11:07:45 +0100 |
commit | a381525cdb1cf643554a608d4b2f89d6f19fc50f (patch) | |
tree | 8d1c44e8b800337ff8488d8f97362d1bb20d8b07 /drivers | |
parent | 965840ce52873dbc78c8021e13dc32b4127b4386 (diff) |
Thermal: Modify the panic zone to be more agressive
Modify the panic zone to be more agressive with the cooling.
Basically once this zone is reached the governor should set the
threshold windows so that it can be notified if the temp is still
increasing once the the CPU is throttle. If the temp is still increasing
then go to the next OPP until max throttling.
Change-Id: I4d4698a8f8ead5ce243032d80e136d7638e675f9
Signed-off-by: Dan Murphy <dmurphy@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/thermal_framework/governor/omap_die_governor.c | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/drivers/staging/thermal_framework/governor/omap_die_governor.c b/drivers/staging/thermal_framework/governor/omap_die_governor.c index a2343991a48f..33ed1665b5bf 100644 --- a/drivers/staging/thermal_framework/governor/omap_die_governor.c +++ b/drivers/staging/thermal_framework/governor/omap_die_governor.c @@ -310,13 +310,8 @@ out: omap_gov->cooling_level = 0; thermal_cooling_set_level(&cooling_agents, omap_gov->cooling_level); - } else { /* omap_gov->panic_zone_reached == 1 */ - /* - * Temperature falls from panic zone and - * enters into alert zone - * Wait until temperature falls into monitor zone - */ } + list_del_init(&cooling_agents); die_temp_lower = hotspot_temp_to_sensor_temp( OMAP_ALERT_TEMP - HYSTERESIS_VALUE); @@ -367,17 +362,29 @@ out: return -ENODEV; } else { omap_gov->cooling_level++; + omap_gov->panic_zone_reached++; + pr_info("%s: Panic zone reached %i times\n", + __func__, omap_gov->panic_zone_reached); thermal_cooling_set_level(&cooling_agents, omap_gov->cooling_level); list_del_init(&cooling_agents); die_temp_lower = hotspot_temp_to_sensor_temp( OMAP_PANIC_TEMP - HYSTERESIS_VALUE); - die_temp_upper = hotspot_temp_to_sensor_temp(OMAP_FATAL_TEMP); + + /* Set the threshold window to below fatal. This way the + * governor can manage the thermal if the temp should rise + * while throttling. We need to be agressive with throttling + * should we reach this zone. */ + die_temp_upper = (((OMAP_FATAL_TEMP - OMAP_PANIC_TEMP) / 4) * + omap_gov->panic_zone_reached ) + OMAP_PANIC_TEMP; + if (die_temp_upper >= OMAP_FATAL_TEMP) + die_temp_upper = OMAP_FATAL_TEMP; + + die_temp_upper = hotspot_temp_to_sensor_temp(die_temp_upper); thermal_update_temp_thresholds(omap_gov->temp_sensor, die_temp_lower, die_temp_upper); omap_update_report_rate(omap_gov->temp_sensor, FAST_TEMP_MONITORING_RATE); - omap_gov->panic_zone_reached = 1; } return 0; |