acpi: Read temperature before trip points for HP Compaq 6715b and 6715s
Subsystems (2)
PATCH 1/1 acpi: Read temperature before trip points for HP Compaq 6715b and 6715s
From: Katabami Kohei <[email protected]>
For HP Compaq 6715b and 6715s, temperature has to be read before trip points. This fixes bug #43284 which is introduced by:
commit 9bcb8118965ab4631a65ee0726e6518f75cda6c5
Author: Matthew Garrett <mjg <at> redhat.com> Date: Wed Feb 1 10:26:54 2012 -0500
ACPI: Evaluate thermal trip points before reading temperature
The patch is originally written by Jason Vas Dias:
http://thread.gmane.org/gmane.linux.kernel/1324409/focus=1324503
Katabami cleaned it up.
--- drivers/acpi/thermal.c | 56 +++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 48 insertions(+), 8 deletions(-)
Hi Len,
I didn't find Katabami's patch in your git tree. Please apply this patch as soon as possible as in fact it's fixing a regression that was introduced with Matthew's change.
The corresponding bug report is
http://bugzilla.kernel.org/show_bug.cgi?id=43284
I've rebased the patch on v3.7-rc6-46-g45e7715 and also added a stable tag.
Thanks,
Andreas
drivers/acpi/thermal.c +48 -8
@@ -96,6 +96,8 @@ static int psv;module_param (psv, int,0644 );MODULE_PARM_DESC (psv,"Disable or override all passive trip points." ); +static int temp_before_trip; +static int acpi_thermal_add (struct acpi_device *device);static int acpi_thermal_remove (struct acpi_device *device,int type);static void acpi_thermal_notify (struct acpi_device *device,u32 event);
@@ -992,15 +994,32 @@ static int acpi_thermal_get_info(struct acpi_thermal *tz)if (!tz)return -EINVAL ; -/* Get trip points [_CRT, _PSV, etc.] (required) */ - result =acpi_thermal_get_trip_points (tz); -if (result) -return result; +if (temp_before_trip) { +/* +* some hardwares need temperature before trip points +* can be obtained +*/ -/* Get temperature [_TMP] (required) */ - result =acpi_thermal_get_temperature (tz); -if (result) -return result; +/* Get temperature [_TMP] (required) */ + result =acpi_thermal_get_temperature (tz); +if (result) +return result; + +/* Get trip points [_CRT, _PSV, etc.] (required) */ + result =acpi_thermal_get_trip_points (tz); +if (result) +return result; + }else { +/* Get trip points [_CRT, _PSV, etc.] (required) */ + result =acpi_thermal_get_trip_points (tz); +if (result) +return result; + +/* Get temperature [_TMP] (required) */ + result =acpi_thermal_get_temperature (tz); +if (result) +return result; + }/* Set the cooling mode [_SCP] to active cooling (default) */ result =acpi_thermal_set_cooling_mode (tz,ACPI_THERMAL_MODE_ACTIVE );
@@ -1164,6 +1183,15 @@ static int thermal_psv(const struct dmi_system_id *d) {return 0 ; } +static int thermal_temp_before_trip (const struct dmi_system_id *d) +{ + +printk (KERN_NOTICE "ACPI: %s detected: getting temperature before trip point initialisation\n" , + d->ident); + temp_before_trip =1 ; +return 0 ; +} +static struct dmi_system_id thermal_dmi_table[]__initdata = {/* * Award BIOS on this AOpen makes thermal control almost worthless.
@@ -1201,6 +1229,18 @@ static struct dmi_system_id thermal_dmi_table[] __initdata = { DMI_MATCH(DMI_BOARD_NAME, "7ZX"), }, }, +/* +* Some HP Compaq require temperature before trip points +* https://bugzilla.kernel.org/show_bug.cgi?id=43284 +*/ + { + .callback = thermal_temp_before_trip, + .ident = "HP Compaq 6715b or 6715s", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), + DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq 6715"), + }, + }, {} };
Signature · 1 line
1.7.9.5
Quoted 9 lines · Andreas Herrmann
From: Katabami Kohei <[email protected]>
For HP Compaq 6715b and 6715s, temperature has to be read before trip points. This fixes bug #43284 which is introduced by:
commit
9bcb8118965ab4631a65ee0726e6518f75cda6c5Author: Matthew Garrett <mjg <at> redhat.com> Date: Wed Feb 1 10:26:54 2012 -0500
Quoted 6 lines
ACPI: Evaluate thermal trip points before reading temperature
The patch is originally written by Jason Vas Dias:
http://thread.gmane.org/gmane.linux.kernel/1324409/focus=1324503Katabami cleaned it up.
Rui, I need your ACK for this patch, if you agree with it.
Thanks,
Rafael
Quoted 116 lines
Cc [email protected] # >= 3.4Reported-by Suloev Dmitry <[email protected]>Reviewed-by Thomas Renninger <[email protected]>Signed-off-by Katabami Kohei <[email protected]>Signed-off-by Andreas Herrmann <[email protected]>--- drivers/acpi/thermal.c | 56 +++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 48 insertions(+), 8 deletions(-)Hi Len,
I didn't find Katabami's patch in your git tree. Please apply this patch as soon as possible as in fact it's fixing a regression that was introduced with Matthew's change.
The corresponding bug report is
http://bugzilla.kernel.org/show_bug.cgi?id=43284I've rebased the patch on v3.7-rc6-46-g45e7715 and also added a stable tag.
Thanks,
Andreas
drivers/acpi/thermal.c +48
-8@@ -96,6 +96,8 @@ static int psv;module_param (psv, int,0644 );MODULE_PARM_DESC (psv,"Disable or override all passive trip points." ); +static int temp_before_trip; +static int acpi_thermal_add (struct acpi_device *device);static int acpi_thermal_remove (struct acpi_device *device,int type);static void acpi_thermal_notify (struct acpi_device *device,u32 event);@@ -992,15 +994,32 @@ static int acpi_thermal_get_info(struct acpi_thermal *tz)if (!tz)return -EINVAL ; -/* Get trip points [_CRT, _PSV, etc.] (required) */ - result =acpi_thermal_get_trip_points (tz); -if (result) -return result; +if (temp_before_trip) { +/* +* some hardwares need temperature before trip points +* can be obtained +*/ -/* Get temperature [_TMP] (required) */ - result =acpi_thermal_get_temperature (tz); -if (result) -return result; +/* Get temperature [_TMP] (required) */ + result =acpi_thermal_get_temperature (tz); +if (result) +return result; + +/* Get trip points [_CRT, _PSV, etc.] (required) */ + result =acpi_thermal_get_trip_points (tz); +if (result) +return result; + }else { +/* Get trip points [_CRT, _PSV, etc.] (required) */ + result =acpi_thermal_get_trip_points (tz); +if (result) +return result; + +/* Get temperature [_TMP] (required) */ + result =acpi_thermal_get_temperature (tz); +if (result) +return result; + }/* Set the cooling mode [_SCP] to active cooling (default) */ result =acpi_thermal_set_cooling_mode (tz,ACPI_THERMAL_MODE_ACTIVE );@@ -1164,6 +1183,15 @@ static int thermal_psv(const struct dmi_system_id *d) {return 0 ; } +static int thermal_temp_before_trip (const struct dmi_system_id *d) +{ + +printk (KERN_NOTICE "ACPI: %s detected: getting temperature before trip point initialisation\n" , + d->ident); + temp_before_trip =1 ; +return 0 ; +} +static struct dmi_system_id thermal_dmi_table[]__initdata = {/* * Award BIOS on this AOpen makes thermal control almost worthless. @@ -1201,6 +1229,18 @@ static struct dmi_system_id thermal_dmi_table[] __initdata = { DMI_MATCH(DMI_BOARD_NAME, "7ZX"), }, }, +/* +* Some HP Compaq require temperature before trip points +* https://bugzilla.kernel.org/show_bug.cgi?id=43284 +*/ + { + .callback = thermal_temp_before_trip, + .ident = "HP Compaq 6715b or 6715s", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), + DMI_MATCH(DMI_PRODUCT_NAME, "HP Compaq 6715"), + }, + }, {} };
Signature · 2 lines
I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.