From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755394AbeAJNY1 (ORCPT + 1 other); Wed, 10 Jan 2018 08:24:27 -0500 Received: from mga01.intel.com ([192.55.52.88]:6999 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751630AbeAJNYZ (ORCPT ); Wed, 10 Jan 2018 08:24:25 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,340,1511856000"; d="scan'208";a="22909299" Message-ID: <1515590661.7000.855.camel@linux.intel.com> Subject: Re: [PATCH 1/2] ACPI / PM: Use Low Power S0 Idle on more systems From: Andy Shevchenko To: "Rafael J. Wysocki" , Linux ACPI Cc: Darren Hart , LKML , Linux PM , Platform Driver , Valentin Manea Date: Wed, 10 Jan 2018 15:24:21 +0200 In-Reply-To: <12541194.33112yYDjW@aspire.rjw.lan> References: <4046497.JI7UjL75gC@aspire.rjw.lan> <12541194.33112yYDjW@aspire.rjw.lan> Organization: Intel Finland Oy Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.26.3-1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Wed, 2018-01-10 at 13:26 +0100, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > Some systems don't support the ACPI_LPS0_ENTRY and ACPI_LPS0_EXIT > functions in their Low Power S0 Idle _DSM, but still expect EC > events to be processed in the suspend-to-idle state for power button > wakeup (among other things) to work. Surface Pro3 turns out to be > one of them. > > Fortunately, it still provides Low Power S0 Idle _DSM with the screen > on/off functions supported, so modify the ACPI suspend-to-idle to use > the Low Power S0 Idle code path for all systems supporting the > ACPI_LPS0_ENTRY and ACPI_LPS0_EXIT or the ACPI_LPS0_SCREEN_OFF and > ACPI_LPS0_SCREEN_ON functions in their Low Power S0 Idle _DSM. > > Potentially, that will cause more systems to use suspend-to-idle by > default, so some future corrections may be necessary if it leads > to issues, but let it remain more straightforward for now. > -#define ACPI_S2IDLE_FUNC_MASK ((1 << ACPI_LPS0_ENTRY) | (1 << > ACPI_LPS0_EXIT)) > +#define ACPI_LPS0_SCREEN_MASK ((1 << ACPI_LPS0_SCREEN_OFF) | > (1 << ACPI_LPS0_SCREEN_ON)) > +#define ACPI_LPS0_S2I_MASK ((1 << ACPI_LPS0_ENTRY) | (1 << > ACPI_LPS0_EXIT)) Just a nitpick: Can we leave S2IDLE instead of S2I? Would it make sense for potential code readers? -- Andy Shevchenko Intel Finland Oy