]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: SOF: Intel: hda: solve MSI issues by merging ipc and stream irq handlers
authorBard Liao <yung-chuan.liao@linux.intel.com>
Wed, 4 Dec 2019 21:28:59 +0000 (15:28 -0600)
committerMark Brown <broonie@kernel.org>
Mon, 9 Dec 2019 18:35:56 +0000 (18:35 +0000)
commitbbaa4b17b32a8e7a7f82516a025148b87ba60363
tree1316234b4cecc9854d2493dd02840a035e400534
parent5a79ce802b09fede1ab11331dac40e3b1f190656
ASoC: SOF: Intel: hda: solve MSI issues by merging ipc and stream irq handlers

The existing code uses two handlers for a shared edge-based MSI interrupts.
In corner cases, interrupts are lost, leading to IPC timeouts. Those
timeouts do not appear in legacy mode.

This patch merges the two handlers and threads into a single one, and
simplifies the mask/unmask operations by using a single top-level mask
(Global Interrupt Enable). The handler only checks for interrupt
sources using the Global Interrupt Status (GIS) field, and all the
actual work happens in the thread. This also enables us to remove the
use of spin locks. Stream events are prioritized over IPC ones.

This patch was tested with HDaudio and SoundWire platforms, and all
known IPC timeout issues are solved in MSI mode. The
SoundWire-specific patches will be provided in follow-up patches,
where the SoundWire interrupts are handled in the same thread as IPC
and stream interrupts.

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/20191204212859.13239-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/intel/apl.c
sound/soc/sof/intel/cnl.c
sound/soc/sof/intel/hda-ipc.c
sound/soc/sof/intel/hda-stream.c
sound/soc/sof/intel/hda.c
sound/soc/sof/intel/hda.h