Kernel Bug Tracker – Bug 1770
cooling _mode gives <not supported>
Last modified: 2004-11-03 15:43:06 UTC
Some DSDT don't have _SCP method, which result in
/proc/acpi/thermal*/THM*/cooling _mode gives <not supported>. It's wrong message
to user. Actually, the cooling mode should be Active mode.
Created attachment 1775 [details]
a proposal patch
Created attachment 1776 [details]
OOPS, it should be passive mode
please fix syntax so that it matches existing /proc/ file format.
I don't think this patch is right to go.
If _PSV failed, cooling mode is also <not support>.
I think a easy way to do is:
--- linux-2.6.7-rc2/drivers/acpi/thermal.c.orig 2004-06-18 15:48:40.493865544 +0800
+++ linux-2.6.7-rc2/drivers/acpi/thermal.c 2004-06-18 15:49:07.443768536 +0800
@@ -1220,7 +1220,7 @@ acpi_thermal_get_info (
/* Set the cooling mode [_SCP] to active cooling (default) */
result = acpi_thermal_set_cooling_mode(tz, ACPI_THERMAL_MODE_ACTIVE);
- if (!result)
+ if (result)
tz->flags.cooling_mode = 1;
/* Get trip points [_CRT, _PSV, etc.] (required) */
Correct me if i'm wrong.
Sorry for my mistake. My patch above is wrong!
I did mistake with tz->cooling_mode and tz->flags.cooling_mode...
For those _SCP is not exist. We should check _ACx and _PSV threshholds,
then tell user the general idea of cooling mode, but no ablity to set it.
Created attachment 3319 [details]
This patch trys to do properly on reporting cooling_mode to user.
If _SCP is exist, the default cooling_mode is active and every time
after user alter the mode, we should do acpi_thermal_check().
If _SCP is not exist, the patch according with acpi spec 12.2 calculates the
threshholds of _AC and _PSV to get the cooling_mode.
As _AC and _PSV are optional, if none of
them are exist, the mode will be ACPI_THERMAL_MODE_CRT. Also tell user
that setting cooling mode is not supported.
Pls help to review.
Created attachment 3351 [details]
everytime we change the threshholds, we will check cooling_mode
with latest values.
This patch includes the patch of bug 2588, and changes a little.
Comment on attachment 3351 [details]
will re-work on this against current bk tree
Created attachment 3367 [details]
This patch is against current acpi-test-2.6.8 bk tree.
Some content issues of proc are fixed.
shipped in Linux-2.4.27 and Linux-184.108.40.206, closing.