Skip to content

Conversation

@ujfalusi
Copy link
Contributor

When the dma-trace is enabled (or re-enabled) the DMA channel is
re-initialized, configured.
The DMA will start reading data from the local buffer from the start (!!)
it can not be configured to start reading from the point it is left off.

Because of this, if the dtrace is disabled and re-enabled, the DMA will
copy old log entries starting from the beginning of the local buffer.

To be able to preserve the logs while the dtrace is disable we need to
reset both read and write pointers on the local buffer and when the dtrace
is again enabled we can transfer the logs from this point, without
misaligned or missed logs.

Signed-off-by: Peter Ujfalusi peter.ujfalusi@linux.intel.com

When the dma-trace is enabled (or re-enabled) the DMA channel is
re-initialized, configured.
The DMA will start reading data from the local buffer from the start (!!)
it can not be configured to start reading from the point it is left off.

Because of this, if the dtrace is disabled and re-enabled, the DMA will
copy old log entries starting from the beginning of the local buffer.

To be able to preserve the logs while the dtrace is disable we need to
reset both read and write pointers on the local buffer and when the dtrace
is again enabled we can transfer the logs from this point, without
misaligned or missed logs.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
@lgirdwood lgirdwood merged commit 58ce6e6 into thesofproject:main Feb 22, 2022
@marc-hb
Copy link
Collaborator

marc-hb commented Feb 24, 2022

Revert submitted in #5410

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants