[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CABXOdTf8oFN-_SKuY0hxXSSkpdGU4MzV1t290TB3TqAOLVqrig@mail.gmail.com>
Date: Sat, 11 Jun 2022 15:01:20 -0700
From: Guenter Roeck <groeck@...gle.com>
To: Stephen Boyd <swboyd@...omium.org>
Cc: Benson Leung <bleung@...omium.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
patches@...ts.linux.dev, Guenter Roeck <groeck@...omium.org>,
"open list:CHROME HARDWARE PLATFORM SUPPORT"
<chrome-platform@...ts.linux.dev>,
Evan Green <evgreen@...omium.org>,
Rajat Jain <rajatja@...omium.org>,
Matthias Kaehlcke <mka@...omium.org>,
Hsin-Yi Wang <hsinyi@...omium.org>
Subject: Re: [PATCH v2] platform/chrome: cros_ec: Always expose last resume result
On Fri, Jun 10, 2022 at 11:18 PM Stephen Boyd <swboyd@...omium.org> wrote:
>
> The last resume result exposing logic in cros_ec_sleep_event()
> incorrectly requires S0ix support, which doesn't work on ARM based
> systems where S0ix doesn't exist. That's because cros_ec_sleep_event()
> only reports the last resume result when the EC indicates the last sleep
> event was an S0ix resume. On ARM systems, the last sleep event is always
> S3 resume, but the EC can still detect sleep hang events in case some
> other part of the AP is blocking sleep.
>
> Always expose the last resume result if the EC supports it so that this
> works on all devices regardless of S0ix support. This fixes sleep hang
> detection on ARM based chromebooks like Trogdor.
>
> Cc: Evan Green <evgreen@...omium.org>
> Cc: Rajat Jain <rajatja@...omium.org>
> Cc: Matthias Kaehlcke <mka@...omium.org>
> Cc: Hsin-Yi Wang <hsinyi@...omium.org>
> Fixes: 7235560ac77a ("platform/chrome: Add support for v1 of host sleep event")
> Signed-off-by: Stephen Boyd <swboyd@...omium.org>
Reviewed-by: Guenter Roeck <groeck@...omium.org>
> ---
>
> Changes from v1 (https://lore.kernel.org/r/20220610223703.3387691-1-swboyd@chromium.org):
> * Fixed typo
>
> drivers/platform/chrome/cros_ec.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/platform/chrome/cros_ec.c b/drivers/platform/chrome/cros_ec.c
> index b3e94cdf7d1a..3abef9747482 100644
> --- a/drivers/platform/chrome/cros_ec.c
> +++ b/drivers/platform/chrome/cros_ec.c
> @@ -135,10 +135,10 @@ static int cros_ec_sleep_event(struct cros_ec_device *ec_dev, u8 sleep_event)
> buf.msg.command = EC_CMD_HOST_SLEEP_EVENT;
>
> ret = cros_ec_cmd_xfer_status(ec_dev, &buf.msg);
> -
> - /* For now, report failure to transition to S0ix with a warning. */
> + /* Report failure to transition to system wide suspend with a warning. */
> if (ret >= 0 && ec_dev->host_sleep_v1 &&
> - (sleep_event == HOST_SLEEP_EVENT_S0IX_RESUME)) {
> + (sleep_event == HOST_SLEEP_EVENT_S0IX_RESUME ||
> + sleep_event == HOST_SLEEP_EVENT_S3_RESUME)) {
> ec_dev->last_resume_result =
> buf.u.resp1.resume_response.sleep_transitions;
>
>
> base-commit: f2906aa863381afb0015a9eb7fefad885d4e5a56
> --
> https://chromeos.dev
>
Powered by blists - more mailing lists