mbox series

[0/4] ASoC: SOF: Intel: Harden the IPC4 low level sequencing

Message ID 20221018124008.6846-1-peter.ujfalusi@linux.intel.com
Headers show
Series ASoC: SOF: Intel: Harden the IPC4 low level sequencing | expand

Message

Peter Ujfalusi Oct. 18, 2022, 12:40 p.m. UTC
Hi,

The IPC4 use of doorbell registers leaves some corner cases not well defined
and the 'correct sequences' are subjective in a sense.
The DSP doorbell registers are used as separate and independent channels and
the sequences for host -> DSP -> host (reply) can be racy.

For example:
The ACKing of a received message can happen before the firmware sends the reply
or it can as well happen after the reply has been sent and received by the host.
Both can be considered 'correct sequences' but they need different handling.

This series will allow the kernel to service any interpretation of the
sequencing on the firmware side.

Regards,
Peter
---
Peter Ujfalusi (4):
  ASoC: SOF: ipc4: Log the tx message before sending it
  ASoC: SOF: Intel: ipc4: Read the interrupt reason registers at the
    same time
  ASoC: SOF: Intel: ipc4: Wait for channel to be free before sending a
    message
  ASoC: SOF: Intel: ipc4: Ack a received reply or notification
    separately

 sound/soc/sof/intel/cnl.c     | 26 ++++++++++++++++++++++----
 sound/soc/sof/intel/hda-ipc.c | 27 +++++++++++++++++++++++----
 sound/soc/sof/intel/hda.c     | 11 +++++++++++
 sound/soc/sof/intel/hda.h     |  9 +++++++++
 sound/soc/sof/intel/mtl.c     | 24 +++++++++++++++++++++---
 sound/soc/sof/ipc4.c          |  4 ++--
 6 files changed, 88 insertions(+), 13 deletions(-)

Comments

Mark Brown Oct. 19, 2022, 2:18 p.m. UTC | #1
On Tue, 18 Oct 2022 15:40:04 +0300, Peter Ujfalusi wrote:
> The IPC4 use of doorbell registers leaves some corner cases not well defined
> and the 'correct sequences' are subjective in a sense.
> The DSP doorbell registers are used as separate and independent channels and
> the sequences for host -> DSP -> host (reply) can be racy.
> 
> For example:
> The ACKing of a received message can happen before the firmware sends the reply
> or it can as well happen after the reply has been sent and received by the host.
> Both can be considered 'correct sequences' but they need different handling.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/4] ASoC: SOF: ipc4: Log the tx message before sending it
      commit: 2d91d5715f5f3b24456ede20dbbe967a1d2a0a3e
[2/4] ASoC: SOF: Intel: ipc4: Read the interrupt reason registers at the same time
      commit: c8ed7ce242db83ca2c4e9eab557a88adbae5ef6a
[3/4] ASoC: SOF: Intel: ipc4: Wait for channel to be free before sending a message
      commit: 483e4cdfb502e6bea6b0a226a3ff7c22e60153de
[4/4] ASoC: SOF: Intel: ipc4: Ack a received reply or notification separately
      commit: 010c050fe9ea263e3fc17493822117610a23f662

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark