public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Johannes Stezenbach <js@sig21.net>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	linux-clk@vger.kernel.org, linux-pm@vger.kernel.org,
	Carlo Caione <carlo@endlessm.com>,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	Darren Hart <dvhart@infradead.org>,
	Enric Balletbo i Serra <enric.balletbo@collabora.com>,
	Takashi Iwai <tiwai@suse.de>,
	linux-acpi@vger.kernel.org
Subject: Re: S0ix failure due to "clk: x86: Do not gate clocks enabled by the firmware"
Date: Fri, 22 Sep 2017 14:27:57 +0200	[thread overview]
Message-ID: <s5hzi9mdik2.wl-tiwai@suse.de> (raw)
In-Reply-To: <20170922080453.3bwad4ale4zizf42@sig21.net>

On Fri, 22 Sep 2017 10:04:53 +0200,
Johannes Stezenbach wrote:
> 
> On Fri, Sep 22, 2017 at 12:35:15AM +0200, Rafael J. Wysocki wrote:
> > On Thursday, September 21, 2017 6:23:07 PM CEST Johannes Stezenbach wrote:
> > > On Thu, Sep 21, 2017 at 04:21:46PM +0200, Rafael J. Wysocki wrote:
> > > > So I would be inclined to think of that as a BIOS issue.
> > > 
> > > OK, wrt $Subject it sparks the question how to fix the
> > > issue exposed by commit d31fd43c0f9a4 "clk: x86: Do not
> > > gate clocks enabled by the firmware".  Add quirks to
> > > the drivers for the devices that have the dangling
> > > PowerResources and manually call _OFF/_ON during suspend/resume?
> > > 
> > > I must admit I haven't looked deeper into the issue yet,
> > > i.e. I don't know which clock causes S0ix failure.
> > > If I understand correctly, before d31fd43c0f9a4 the
> > > clk framework would just disable all unused clocks
> > > registered by clk-pmc-atom.c, which are all of then except
> > > CLK3 which is used by the audio codec. And the audio codec
> > > would disable CLK3 during suspend.
> > > After d31fd43c0f9a4 all clocks that BIOS had enabled during boot
> > > are kept running.  Presumably we could also add the quirk to
> > > clk-pmc-atom.c to bypass what d31fd43c0f9a4 added on Asus E200HA?
> > 
> > Since this is S0ix, the "system level" is 0 all the time (as I said in a
> > previous message).
> 
> Damn.  Reading ACPI spec (6.1 and 6.2), it talks about _LPI and _RDI
> but E200HA doesn't have that in any ACPI table.
> The table in section 7.1 Power Resource Objects and the Power Management Models
> says "Choose a supported device state to enable a targeted system sleep or
> Low- power Idle state ... [use] _PRx".
> 
> > So there seem to be two possible ways to address this, unfortunately both
> > based on white- or blacklisting.
> > 
> > One of them would be to only do the d31fd43c0f9a4 approach for selected
> > systems where it needs to be done to avoid breakage.  The other one would
> > be to do it for all systems by default and blacklist the ones where that
> > leads to problems.
> > 
> > IMO it is better to disable clocks over suspend-resume, because that reduces
> > the system's power draw while suspended.  So that's what I would do and then
> > keep the clocks running only if that is known to be necessary.
> 
> d31fd43c0f9a4 was added to fix a "hard hangup on boot" issue,
> so I guess the default should be to keep clocks enabled.
> 
> BTW, in E200HA DSDT, the PowerResources in question are children of
> the I2Cx devices, presumably it means these clocks are to be used by
> devices connected to the i2c busses.  Maybe it's a left over from devices
> that are not present in E200HA, and we should ignore them.
> 
> In conclusion the BIOS bug is that it enables these clocks at boot,
> and the correct quirk is to make clk-pmc-atom.c disable them during init,
> but leave the _PRx handling for the used clocks (CLK3) to ACPI.

Well, I can't say which is the buggy behavior, but at least, I agree
with Rafael that white/blacklisting is likely the way to go.

One thing I'm wondering is whether it's specific to device or specific
to platform.  The ASUS one that showed a regression Johannes and I
have is the Cherrytrail, while the device showed the hang-at-boot was
Baytrail, IIRC.


thanks,

Takashi

  reply	other threads:[~2017-09-22 12:27 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20170906204237.24x6fzlfmq7jmuce@sig21.net>
     [not found] ` <5bb7e3ca-38fc-1184-3bca-f666275c6180@linux.intel.com>
2017-09-08 13:49   ` S0ix failure due to "clk: x86: Do not gate clocks enabled by the firmware" Johannes Stezenbach
2017-09-21  9:40     ` Johannes Stezenbach
2017-09-21 14:21       ` Rafael J. Wysocki
2017-09-21 16:23         ` Johannes Stezenbach
2017-09-21 22:20           ` Rafael J. Wysocki
2017-09-21 22:24             ` Rafael J. Wysocki
2017-09-21 22:35           ` Rafael J. Wysocki
2017-09-22  8:04             ` Johannes Stezenbach
2017-09-22 12:27               ` Takashi Iwai [this message]
2017-09-22 21:04                 ` Johannes Stezenbach
2017-09-22 22:12                 ` Rafael J. Wysocki
2017-09-22 22:09               ` Rafael J. Wysocki
2017-09-25 19:17                 ` Johannes Stezenbach
2017-09-25 19:21                   ` [RFC PATCH 1/2] platform/x86: add Atom PMC quirk to disable SATA Johannes Stezenbach
2017-12-13  0:00                     ` Rafael J. Wysocki
2017-12-13  8:53                       ` Hans de Goede
2017-12-13 11:13                         ` Johannes Stezenbach
2017-12-13 15:25                         ` Michael Turquette
2017-12-13 16:04                           ` Hans de Goede
2017-12-13 16:22                             ` Johannes Stezenbach
2017-12-13 16:37                               ` Hans de Goede
2017-12-13 19:33                                 ` Andy Shevchenko
2017-12-14 10:53                                   ` Hans de Goede
2017-09-25 19:23                 ` [RFC PATCH 2/2] clk: x86: Disable unused clocks to fix S0ix Johannes Stezenbach
2017-12-13  0:01                   ` Rafael J. Wysocki
2017-12-13  8:56                     ` Hans de Goede
2017-12-13 10:20                       ` Carlo Caione
2017-12-13 11:22                       ` Johannes Stezenbach
2017-12-13 14:25                         ` Pierre-Louis Bossart
2017-12-13 14:29                       ` Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5hzi9mdik2.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=carlo@endlessm.com \
    --cc=dvhart@infradead.org \
    --cc=enric.balletbo@collabora.com \
    --cc=js@sig21.net \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=rjw@rjwysocki.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox