Skip to content

dma-trace: send ipc msg after update host pointer#4763

Merged
lgirdwood merged 1 commit intothesofproject:mainfrom
kuanhsuncheng:mt8195
Sep 17, 2021
Merged

dma-trace: send ipc msg after update host pointer#4763
lgirdwood merged 1 commit intothesofproject:mainfrom
kuanhsuncheng:mt8195

Conversation

@kuanhsuncheng
Copy link
Contributor

When I use logger to trace the sof message, there some left data in dma buffer.

I find trace_work updates host pointer after dma_copy_to_host_nowait.

but dma_copy_to_host_nowait will send ipc msg before updating the new host offset.

I think the ipc_msg_send (send the host_offset information) should be after update host pointer.

If there is anything I don't well considered, please let me know.

Thanks.

before copy section to host, the hist pointer should

be updated.

otherwise, there are some left data in dma buffer and

host don't know.

Signed-off-by: Allen-KH Cheng <allen-kh.cheng@mediatek.com>
@lgirdwood
Copy link
Member

@marc-hb would this explain the missing data we see from time to time ?

@lgirdwood lgirdwood added this to the v1.9 milestone Sep 15, 2021
@marc-hb
Copy link
Collaborator

marc-hb commented Sep 15, 2021

The description sounds indeed similar to "stuck traces" issue #4333.

@kuanhsuncheng can you please try the check-sof-logger.sh test after locally disabling the dma_nudge() workaround?
thesofproject/sof-test@b0b7c2d5e2fba8

Everyone please correct me but dma_copy_to_host_nowait() is not just for the trace, so moving the IPC like this would break non-trace DMA wouldn't it?

Copy link
Contributor

@keyonjie keyonjie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good finding to me actually.

w.r.t the usage in the probe feature, it looks odd to me that it sends the dma_trace position to host side, haven't tracked it so might need Cezary's comment here.

@lgirdwood
Copy link
Member

This is correct. This wont affect probes() or trace on HDA since the drivers use the LIPB to get position updates instead of an IPC.
Looks like a network error for BYT timeout in CI. https://sof-ci.01.org/sofpr/PR4763/build10333/devicetest/?model=BYT_MB_NOCODEC&testcase=verify-firmware-presence

@lgirdwood lgirdwood merged commit ed5d2fe into thesofproject:main Sep 17, 2021
@plbossart
Copy link
Member

This wont affect probes() or trace on HDA since the drivers use the LIPB to get position updates instead of an IPC.

Did you mean DPIB? I've never seen LPIB being used for data transfers.

@lgirdwood
Copy link
Member

This wont affect probes() or trace on HDA since the drivers use the LIPB to get position updates instead of an IPC.

Did you mean DPIB? I've never seen LPIB being used for data transfers.

Yes.

marc-hb added a commit to marc-hb/sof-test that referenced this pull request Sep 21, 2021
…#4333

Looks like thesofproject/sof#4763 might have
fixed it.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
@kuanhsuncheng kuanhsuncheng deleted the mt8195 branch September 23, 2021 03:12
marc-hb added a commit to thesofproject/sof-test that referenced this pull request Sep 29, 2021
…#4333

Looks like thesofproject/sof#4763 might have
fixed it.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
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.

5 participants