@@ -307,16 +307,19 @@ static void lpi_check_constraints(bool *met)
acpi_power_state_string(adev->power.state));
if (!adev->flags.power_manageable) {
- acpi_handle_info(handle, "LPI: Device not power manageable\n");
+ if (pm_debug_messages_on)
+ acpi_handle_info(handle, "LPI: Device not power manageable\n");
lpi_constraints_table[i].handle = NULL;
continue;
}
if (adev->power.state < lpi_constraints_table[i].min_dstate) {
- acpi_handle_info(handle,
- "LPI: Constraint not met; min power state:%s current power state:%s\n",
- acpi_power_state_string(lpi_constraints_table[i].min_dstate),
- acpi_power_state_string(adev->power.state));
+ if (pm_debug_messages_on) {
+ acpi_handle_info(handle,
+ "LPI: Constraint not met; min power state:%s current power state:%s\n",
+ acpi_power_state_string(lpi_constraints_table[i].min_dstate),
+ acpi_power_state_string(adev->power.state));
+ }
*met = false;
}
}
@@ -456,8 +459,7 @@ int acpi_s2idle_prepare_late(void)
if (!lps0_device_handle || sleep_no_lps0)
return 0;
- if (pm_debug_messages_on)
- lpi_check_constraints(&constraints_met);
+ lpi_check_constraints(&constraints_met);
/* Screen off */
if (lps0_dsm_func_mask > 0)
Currently LPI constraints are only checked when `pm_debug_messages` has been set. They are mostly used as a debugging tactic. As the results of constraint checking will be passed to consumers of the LPS0 callback, ensure that constraints are checked by default so this value can be trusted. Suggested-by: David E. Box <david.e.box@linux.intel.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> --- changes from v2->v3: * no changes changes from v1->v2: * New patch drivers/acpi/x86/s2idle.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-)