On Thu, Nov 10, 2016 at 10:35 PM, Mario Limonciello <mario.limonciello@xxxxxxxx> wrote: > If the ACPI_FADT_LOW_POWER_S0 bit is set, this indicates the platform > should get identical or better performance using Suspend-To-Idle. > > By removing S3 and S1 userspace will prefer suspend-to-idle in > these situations too. > > Signed-off-by: Mario Limonciello <mario.limonciello@xxxxxxxx> > --- > drivers/acpi/sleep.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c > index deb0ff7..ff1d8f1 100644 > --- a/drivers/acpi/sleep.c > +++ b/drivers/acpi/sleep.c > @@ -171,6 +171,12 @@ static int __init init_nvs_nosave(const struct dmi_system_id *d) > return 0; > } > > +static bool suspend_to_idle_preferred(void) > +{ > + return (acpi_gbl_FADT.flags & ACPI_FADT_LOW_POWER_S0); > +} > + > + > static struct dmi_system_id acpisleep_dmi_table[] __initdata = { > { > .callback = init_old_suspend_ordering, > @@ -908,6 +914,11 @@ int __init acpi_sleep_init(void) > acpi_no_s5 = true; > } > > + if (suspend_to_idle_preferred()) { > + sleep_states[ACPI_STATE_S3] = 0; > + sleep_states[ACPI_STATE_S1] = 0; > + } > + > supported[0] = 0; > for (i = 0; i < ACPI_S_STATE_COUNT; i++) { > if (sleep_states[i]) > -- I'd do that in a different way. Let me cut a patch for that (I haven't had the time to do that yet) and we'll see. Thanks, Rafael -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html