Repository navigation
FROMLIST: soundwire: qcom: switch system sleep to the guarded v2 callbacks - #1593
Open
Gopi Chandra Sekhar Reddy Kanala (gkanala-qc) wants to merge 1 commit into
Conversation
…backs The system sleep callbacks were pm_runtime_force_suspend() and pm_runtime_force_resume(), which run the runtime suspend path on every controller that is runtime active when system suspend starts. That path is only safe in the state runtime PM itself suspends the controller in, with the peripherals suspended and no stream set up: - A set up stream stays prepared and enabled across system sleep, and nothing programs its ports again on resume. With the forced suspend, playback that was running when s2idle was entered stayed silent after resume on Glymur CRD. - Without clock stop, runtime resume resets the bus and only re-initializes the peripherals it saw detach, which peripherals that were never runtime suspended have not done. - A controller that was already runtime suspended had runtime PM disabled from the suspend phase on, instead of from suspend_late as the PM core does, which makes the window in which the wake IRQ handler cannot resume it longer. Replace them with swrm_suspend() and swrm_resume(). swrm_suspend() leaves the controller alone if it is already runtime suspended, if the bus does not support clock stop, or if a stream is set up. Otherwise it forces the controller into runtime suspend and records that in sleep_forced, and swrm_resume() only undoes a forced suspend. A controller that is left running keeps its bus clock and hclk on across system sleep, as before the forced suspend was added. A lane provider has no bus of its own: probe returns before sdw_bus_master_add(), so bus.bus_lock and bus.m_rt_list are not initialized. Its consumer is suspended before it through the device link, so only force the provider into runtime suspend if the consumer was. While at it, move to SYSTEM_SLEEP_PM_OPS(), RUNTIME_PM_OPS() and pm_ptr(), and drop the __maybe_unused annotations. Signed-off-by: Gopi Chandra Sekhar Reddy Kanala <gopi.kanala@oss.qualcomm.com> Link: https://lore.kernel.org/all/20261130-qcom-swr-system-sleep-v2-2-4f65a868813d@oss.qualcomm.com/
Test resultsWorkflow run: 46425942415 attempt 1 Known failures configured: 0
Test Matrix
Failure summaryUnexpected failures
Result: blocked because unexpected failures were found. |
LAVA Failed Case Triage SummaryPR: #1593 Job 302890 | SoC glymur-qli-crdLAVA job: https://lava-oss.qualcomm.com/scheduler/job/302890 Failed test cases in LAVA job 302890 (SoC: glymur-qli-crd).
|
sauravk-git
approved these changes
Dec 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Move the SoundWire controller system sleep callbacks to v2 of the upstream
series, replacing the unconditional forced suspend.
swrm_suspend() now skips the controller if it is already runtime suspended,
if the bus does not support clock stop, or if a stream is set up; otherwise
it forces runtime suspend, and swrm_resume() undoes only that. A lane
provider is forced only if its consumer was.
Tested on Glymur CRD (s2idle): controller held active, suspend right after
playback, suspend during playback, and suspend while idle.
CRs-fixed: 4762865