public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Liao, Bard" <yung-chuan.liao@linux.intel.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Vinod Koul <vkoul@kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	Linux PM <linux-pm@vger.kernel.org>,
	Sanyog Kale <sanyog.r.kale@intel.com>,
	linux-sound@vger.kernel.org, bard.liao@intel.com
Subject: Re: [PATCH v1] soundwire: intel_auxdevice: Fix system suspend/resume handling
Date: Wed, 7 May 2025 16:51:35 +0800	[thread overview]
Message-ID: <eff651df-bc2a-45bf-a629-5adb4f8f398c@linux.intel.com> (raw)
In-Reply-To: <30acf520-c137-4b49-8b69-08e35a7c5969@linux.dev>



On 4/26/2025 1:12 AM, Pierre-Louis Bossart wrote:
> On 4/24/25 20:13, Rafael J. Wysocki wrote:
>> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>>
>> The code in intel_suspend() and intel_resume() needs to be properly
>> synchronized with runtime PM which is not the case currently, so fix
>> it.
>>
>> First of all, prevent runtime PM from triggering after intel_suspend()
>> has started because the changes made by it to the device might be
>> undone by a runtime resume of the device.  For this purpose, add a
>> pm_runtime_disable() call to intel_suspend().
> 
> Allow me to push back on this, because we have to be very careful with a hidden state transition that needs to happen.
> 
> If a controller was suspended by pm_runtime, it will enter the clock stop mode.
> 
> If the system needs to suspend, the controller has to be forced to exit the clock stop mode and the bus has to restart before we can suspend it, and that's why we had those pm_runtime_resume().
> 
> Disabling pm_runtime when entering system suspend would be problematic for Intel hardware, it's a known can of worms.
> 
> It's quite possible that some of the code in intel_suspend() is no longer required because the .prepare will resume the bus properly, but I wanted to make sure this state transition out of clock-stop is known and taken into consideration.
> 
> Bard, is this a configuration you've tested?


Sorry for the late reply. Yes, I tested jack detection in runtime
suspended. Also, the CI test is passed.


      parent reply	other threads:[~2025-05-07  8:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-24 18:13 [PATCH v1] soundwire: intel_auxdevice: Fix system suspend/resume handling Rafael J. Wysocki
2025-04-25 17:12 ` Pierre-Louis Bossart
2025-04-25 18:10   ` Rafael J. Wysocki
2025-04-25 18:43     ` Rafael J. Wysocki
2025-04-26 13:30       ` Rafael J. Wysocki
2025-05-05 10:16       ` Pierre-Louis Bossart
2025-05-07  8:51   ` Liao, Bard [this message]

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=eff651df-bc2a-45bf-a629-5adb4f8f398c@linux.intel.com \
    --to=yung-chuan.liao@linux.intel.com \
    --cc=bard.liao@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=pierre-louis.bossart@linux.dev \
    --cc=rjw@rjwysocki.net \
    --cc=sanyog.r.kale@intel.com \
    --cc=vkoul@kernel.org \
    /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