-
Notifications
You must be signed in to change notification settings - Fork 140
Add new IPC for trace dma free #3197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new IPC for trace dma free #3197
Conversation
70ac1f4 to
a9f6186
Compare
|
@ranj063, while at it, can you also update the |
Add a new SOF_IPC_TRACE_DMA_FREE IPC command to stop and free trace DMA in the FW. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Parse all the trace DMA IPC commands in ipc_log_header(). Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
a9f6186 to
1d50589
Compare
Send the DMA_TRACE_FREE IPC during release to stop and free the trace DMA in the DSP. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
1d50589 to
d4de613
Compare
ujfalusi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ranj063, looks good, thanks. Only one nitpick if you want to fix it.
| struct sof_ipc_fw_ready *ready = &sdev->fw_ready; | ||
| struct sof_ipc_fw_version *v = &ready->version; | ||
| struct sof_ipc_cmd_hdr hdr; | ||
| struct sof_ipc_reply ipc_reply; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: can you swap these?
or move them local under the if(ABI) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plbossart
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit-pick comments, ok to merge and deal with comments with a fixup
| struct sof_ipc_fw_ready *ready = &sdev->fw_ready; | ||
| struct sof_ipc_fw_version *v = &ready->version; | ||
| struct sof_ipc_cmd_hdr hdr; | ||
| struct sof_ipc_reply ipc_reply; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| ret = sof_ipc_tx_message(sdev->ipc, hdr.cmd, &hdr, hdr.size, | ||
| &ipc_reply, sizeof(ipc_reply)); | ||
| if (ret < 0) | ||
| dev_err(sdev->dev, "DMA_TRACE_FREE failed with error: %d\n", ret); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return ret?
or add a comment that on why we don't return?
This can be done with a fixup PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the intention is to continue to the host side release, even if the IPC fails, in this case this should be dev_warn()?
FW PR thesofproject/sof#4849