trace: fix dma trace with repeated data bug on APL&CNL #71
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It is caused by dma trace buffer overflow in FW. There are too many
trace events that the dma trace buffer can’t hold them, And this makes
buffer in chaos.
It is assumed that the trace msg is transferred to host when it is full,
and the occupied memory can be reused. But it is not always true. The dma
trace buffer is used as a ring buffer. In warp case, both tail and head
of the buffer are used, only the tail of buffer is transferred to host and
released. It is because GPDMA only support successive memory mode. So it
is need to be done with two dma calls. Because trace is for debugging
and to occupy the cpu usage as little as possible, only the first dma
transfer is done and the second one is scheduled next time. So only part
of dma trace buffer is released. On APL & CNL, dma gateway is used for dma
trace and it supports wrap mode transfer. So the algorithm can be refined
for dma gateway
Now add a function to do the job for different HW feature. For GPDMA, no
change is made currently, but later it would be refined to support link
list mode. For platform with dma gateway, transferring trace
msg with one dma call.
Test it on BYT, APL
Signed-off-by: Rander Wang rander.wang@linux.intel.com