Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions src/trace/dma-trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,14 @@ int dma_trace_enable(struct dma_trace_data *d)
if (err < 0)
goto out;

/*
* It should be the very first sent log for easily identification.
* Use tr_err to have this initial message also in error logs and assert
* traces works well.
*/
tr_err(&dt_tr, "FW ABI 0x%x DBG ABI 0x%x tag " SOF_GIT_TAG " src hash 0x%08x (ldc hash " META_QUOTE(SOF_SRC_HASH) ")",
SOF_ABI_VERSION, SOF_ABI_DBG_VERSION, SOF_SRC_HASH);

#if CONFIG_DMA_GW
/*
* GW DMA need finish DMA config and start before
Expand All @@ -328,6 +336,9 @@ int dma_trace_enable(struct dma_trace_data *d)
goto out;
#endif

/* flush fw description message */
trace_flush();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@ktrzcinx Why, with this change, tr_info and trace_flush() are no longer close one to each other?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

To flush after dma_trace_start - possible part of trace initialization while writing trace log just after buffer initialization (after moving it one line below then it's not the first trace log)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Ok.

/* validate DMA context */
if (!d->dc.dmac || !d->dc.chan) {
tr_err_atomic(&dt_tr, "dma_trace_enable(): not valid");
Expand All @@ -338,11 +349,6 @@ int dma_trace_enable(struct dma_trace_data *d)
d->enabled = 1;
schedule_task(&d->dmat_work, DMA_TRACE_PERIOD, DMA_TRACE_PERIOD);

/* it should be the very first sent log for easily identification */
tr_info(&dt_tr, "FW ABI 0x%x DBG ABI 0x%x tag " SOF_GIT_TAG " src hash 0x%x (ldc hash " META_QUOTE(SOF_SRC_HASH) ")",
SOF_ABI_VERSION, SOF_ABI_DBG_VERSION, SOF_SRC_HASH);
trace_flush();

out:
platform_shared_commit(d, sizeof(*d));

Expand Down