soundwire: intel/cadence: merge Soundwire interrupt handlers/threads
authorBard Liao <yung-chuan.liao@linux.intel.com>
Thu, 16 Jul 2020 15:09:45 +0000 (23:09 +0800)
committerVinod Koul <vkoul@kernel.org>
Tue, 21 Jul 2020 10:35:41 +0000 (16:05 +0530)
commit4a98a6b2fa75cf90863b7898457b211ace587e8a
tree4547c84f7c354847f1c02d9dfbb2ea8f8c62b274
parent8459cea755e76d04b3f699acdd92676016909ff0
soundwire: intel/cadence: merge Soundwire interrupt handlers/threads

The existing code uses one pair of interrupt handler/thread per link
but at the hardware level the interrupt is shared. This works fine for
legacy PCI interrupts, but leads to timeouts in MSI (Message-Signaled
Interrupt) mode, likely due to edges being lost.

This patch unifies interrupt handling for all links. The dedicated
handler is removed since we use a common one for all shared interrupt
sources, and the thread function takes care of dealing with interrupt
sources. This partition follows the model used for the SOF IPC on
HDaudio platforms, where similar timeout issues were noticed and doing
all the interrupt handling/clearing in the thread improved
reliability/stability.

Validation results with 4 links active in parallel show a night-and-day
improvement with no timeouts noticed even during stress tests. Latency
and quality of service are not affected by the change - mostly because
events on a SoundWire link are throttled by the bus frame rate
(typically 8..48kHz).

Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200716150947.22119-8-yung-chuan.liao@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/soundwire/cadence_master.c
drivers/soundwire/cadence_master.h
drivers/soundwire/intel.c
drivers/soundwire/intel.h
drivers/soundwire/intel_init.c