Centos-kernel-stream-9/drivers/soundwire
Jaroslav Kysela 13ef55c96a soundwire: intel: prevent pm_runtime resume prior to system suspend
commit e38f9ff63e6d ("ACPI: scan: Do not add device IDs from _CID if _HID is not valid")
exposes a race condition on a TGL RVP device leading to a timeout.

The detailed analysis shows the RT711 codec driver scheduling a jack
detection workqueue while attaching during a spurious pm_runtime
resume, and the work function happens to be scheduled after the
manager device is suspended.

The direct link between this ACPI patch and a spurious pm_runtime
resume is not obvious; the most likely explanation is that a change in
the ACPI device linked list management modifies the order in which the
pm_runtime device status is checked and exposes a race condition that
was probably present for a very long time, but was not identified.

We already have a check in the .prepare stage, where we will resume to
full power from specific clock-stop modes. In all other cases, we
don't need to resume to full power by default. Adding the
SMART_SUSPEND flag prevents the spurious resume from happening.

    BugLink: https://github.com/thesofproject/linux/issues/3459
    Fixes: 029bfd1cd53cd ("soundwire: intel: conditionally exit clock stop mode on system suspend")
    Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
    Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
    Reviewed-by: Rander Wang <rander.wang@intel.com>
    Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
    Link: https://lore.kernel.org/r/20220420023241.14335-2-yung-chuan.liao@linux.intel.com
    Signed-off-by: Vinod Koul <vkoul@kernel.org>

Author: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Date: Wed Apr 20 10:32:39 2022 +0800

Signed-off-by: Jaroslav Kysela <jkysela@redhat.com>
(cherry picked from commit 6d9f2dadba698114fed97b224578c5338a36b0d9)
Bugzilla: https://bugzilla.redhat.com/2065578
2022-08-03 08:49:52 +02:00
..
Kconfig soundwire: intel: move to auxiliary bus 2021-06-14 10:12:26 +05:30
Makefile soundwire: Intel: introduce DMI quirks for HP Spectre x360 Convertible 2021-03-22 17:33:10 +05:30
bus.c soundwire: bus: add dev_warn() messages to track UNATTACHED devices 2022-05-26 10:12:52 +02:00
bus.h soundwire: export sdw_update() and sdw_update_no_pm() 2021-06-21 13:00:42 +01:00
bus_type.c soundwire: bus: use correct driver name in error messages 2021-03-30 11:51:42 +05:30
cadence_master.c soundwire: intel: remove PDM support 2022-05-26 10:12:52 +02:00
cadence_master.h soundwire: intel: remove PDM support 2022-05-26 10:12:52 +02:00
debugfs.c soundwire: debugfs: use controller id and link_id for debugfs 2022-01-17 14:05:54 +01:00
dmi-quirks.c ASoC: Intel: sof_sdw: fix quirks for 2022 HP Spectre x360 13" 2022-05-26 10:12:36 +02:00
generic_bandwidth_allocation.c soundwire: bandwidth allocation: improve error messages 2021-05-11 17:34:07 +05:30
intel.c soundwire: intel: prevent pm_runtime resume prior to system suspend 2022-08-03 08:49:52 +02:00
intel.h soundwire: intel: skip suspend/resume/wake when link was not started 2022-01-17 14:05:23 +01:00
intel_init.c soundwire: intel: Use auxiliary_device driver data helpers 2022-05-26 10:12:51 +02:00
master.c soundwire: master: use pm_runtime_set_active() on add 2020-12-02 12:49:34 +05:30
mipi_disco.c
qcom.c soundwire: qcom: use __maybe_unused for swrm_runtime_resume() 2022-05-26 12:31:08 +02:00
slave.c soundwire/ASoC: add leading zeroes in peripheral device name 2021-05-11 17:26:56 +05:30
stream.c soundwire: stream: make enable/disable/deprepare idempotent 2022-05-26 12:31:08 +02:00
sysfs_local.h
sysfs_slave.c soundwire: sysfs: Constify static struct attribute_group 2021-01-19 20:21:20 +05:30
sysfs_slave_dpn.c