Bug 1770
Summary: | cooling _mode gives <not supported> | ||
---|---|---|---|
Product: | ACPI | Reporter: | Luming Yu (luming.yu) |
Component: | Power-Thermal | Assignee: | Luming Yu (luming.yu) |
Status: | CLOSED PATCH_ALREADY_AVAILABLE | ||
Severity: | normal | CC: | acpi-bugzilla |
Priority: | P2 | ||
Hardware: | i386 | ||
OS: | Linux | ||
Kernel Version: | 2.4 2.6 | Subsystem: | |
Regression: | --- | Bisected commit-id: | |
Attachments: |
a proposal patch
an update proposal patch refined patch fixed patch |
Description
Luming Yu
2004-01-01 21:14:32 UTC
Created attachment 1775 [details]
a proposal patch
Created attachment 1776 [details]
an update
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. -zhen 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]
proposal patch
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.
thanks,
-zhen
Created attachment 3351 [details] refined patch 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]
refined patch
will re-work on this against current bk tree
Created attachment 3367 [details]
fixed patch
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-2.6.8.1, closing. |