Skip to content

Commit 3f7cd28

Browse files
Wer-Wolfrafaeljw
authored andcommitted
ACPI: thermal: Execute _SCP before reading trip points
As specified in section 11.4.13 of the ACPI specification the operating system is required to evaluate the _ACx and _PSV objects after executing the _SCP control method. Move the execution of the _SCP control method before the invocation of acpi_thermal_get_trip_points() to avoid missing updates to the _ACx and _PSV objects. Fixes: b09872a ("ACPI: thermal: Fold acpi_thermal_get_info() into its caller") Signed-off-by: Armin Wolf <W_Armin@gmx.de> Link: https://patch.msgid.link/20250410165456.4173-3-W_Armin@gmx.de Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent 8cf4fda commit 3f7cd28

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

drivers/acpi/thermal.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -803,6 +803,12 @@ static int acpi_thermal_add(struct acpi_device *device)
803803

804804
acpi_thermal_aml_dependency_fix(tz);
805805

806+
/*
807+
* Set the cooling mode [_SCP] to active cooling. This needs to happen before
808+
* we retrieve the trip point values.
809+
*/
810+
acpi_execute_simple_method(tz->device->handle, "_SCP", ACPI_THERMAL_MODE_ACTIVE);
811+
806812
/* Get trip points [_ACi, _PSV, etc.] (required). */
807813
acpi_thermal_get_trip_points(tz);
808814

@@ -814,10 +820,6 @@ static int acpi_thermal_add(struct acpi_device *device)
814820
if (result)
815821
goto free_memory;
816822

817-
/* Set the cooling mode [_SCP] to active cooling. */
818-
acpi_execute_simple_method(tz->device->handle, "_SCP",
819-
ACPI_THERMAL_MODE_ACTIVE);
820-
821823
/* Determine the default polling frequency [_TZP]. */
822824
if (tzp)
823825
tz->polling_frequency = tzp;

0 commit comments

Comments
 (0)