Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: b09872a652d3 ("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>

authored by

Armin Wolf and committed by
Rafael J. Wysocki
3f7cd28a 8cf4fdac

+6 -4
+6 -4
drivers/acpi/thermal.c
··· 803 803 804 804 acpi_thermal_aml_dependency_fix(tz); 805 805 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 + 806 812 /* Get trip points [_ACi, _PSV, etc.] (required). */ 807 813 acpi_thermal_get_trip_points(tz); 808 814 ··· 819 813 result = acpi_thermal_get_temperature(tz); 820 814 if (result) 821 815 goto free_memory; 822 - 823 - /* Set the cooling mode [_SCP] to active cooling. */ 824 - acpi_execute_simple_method(tz->device->handle, "_SCP", 825 - ACPI_THERMAL_MODE_ACTIVE); 826 816 827 817 /* Determine the default polling frequency [_TZP]. */ 828 818 if (tzp)