Commit e547d4f7 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull ACPI fixes from Rafael Wysocki:
 "Add checks missed by a previous recent update to the ACPI
  suspend-to-idle code and add a debug module parameter to it
  to work around a platform firmware issue exposed by that
  update (Rafael Wysocki)"

* tag 'acpi-6.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI: PM: s2idle: Add module parameter for LPS0 constraints checking
  ACPI: PM: s2idle: Add missing checks to acpi_s2idle_begin_lps0()
parents 711673f8 7edf6f7e
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -28,6 +28,10 @@ static bool sleep_no_lps0 __read_mostly;
module_param(sleep_no_lps0, bool, 0644);
MODULE_PARM_DESC(sleep_no_lps0, "Do not use the special LPS0 device interface");

static bool check_lps0_constraints __read_mostly;
module_param(check_lps0_constraints, bool, 0644);
MODULE_PARM_DESC(check_lps0_constraints, "Check LPS0 device constraints");

static const struct acpi_device_id lps0_device_ids[] = {
	{"PNP0D80", },
	{"", },
@@ -515,7 +519,8 @@ static struct acpi_scan_handler lps0_handler = {

static int acpi_s2idle_begin_lps0(void)
{
	if (pm_debug_messages_on && !lpi_constraints_table) {
	if (lps0_device_handle && !sleep_no_lps0 && check_lps0_constraints &&
	    !lpi_constraints_table) {
		if (acpi_s2idle_vendor_amd())
			lpi_device_get_constraints_amd();
		else
@@ -539,7 +544,7 @@ static int acpi_s2idle_prepare_late_lps0(void)
	if (!lps0_device_handle || sleep_no_lps0)
		return 0;

	if (pm_debug_messages_on)
	if (check_lps0_constraints)
		lpi_check_constraints();

	/* Screen off */