Skip to content

Conversation

@ujfalusi
Copy link
Collaborator

No description provided.

@ujfalusi
Copy link
Collaborator Author

SOFCI TEST

With the new state we can make sure we are not missing the first
host_offset update.

In case the dtrace is small, the DMA copy will be fast and depending on
the moonphase it might be done before we set the sdev->dtrace_state  to
SOF_DTRACE_ENABLED.

The DMA will start the copy as soon as the host starts the DMA. Set the
dtrace to enabled before we let the DMA to run in order to avoid missing
the position update.

The new state is needed to cover architectures where the host side
snd_sof_dma_trace_trigger() is a NOP and the dtrace in the firmware is
ready as soon as the IPC message has been processed.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
We are using the READ_ONCE() on the debugfs read path for accessing
sdev->host_offset, but the set is not atomic or protected in any way.

Add a small helper to do the host_offset update and be really paranoid
about the a possible race in update

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
…lable

If no new trace data is available then return immediately, there is no
need to continue with the execution of the trace_read() function.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Printing out the host_offset can help tracking the progress and can provide
insights of anything suspicious going on with the dtrace.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
To see what is actually going on.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
To see of the sof-logger is opening the file in the first place...

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
@ujfalusi ujfalusi force-pushed the peter/sof/pr/dtrace_first_update_race_debug_01 branch from 82d82e1 to 83f74b0 Compare March 22, 2022 18:22
@ujfalusi ujfalusi closed this Mar 23, 2022
@ujfalusi ujfalusi deleted the peter/sof/pr/dtrace_first_update_race_debug_01 branch April 6, 2022 11:26
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.

1 participant