-
Notifications
You must be signed in to change notification settings - Fork 143
ASoC: SOF: loader: print DSP boot time in debug prints #5418
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -113,8 +113,9 @@ EXPORT_SYMBOL(snd_sof_load_firmware_memcpy); | |
| int snd_sof_run_firmware(struct snd_sof_dev *sdev) | ||
| { | ||
| struct sof_dsp_power_state state = { | ||
| .state = SOF_DSP_PM_D0, | ||
| }; | ||
| .state = SOF_DSP_PM_D0, | ||
| }; | ||
| ktime_t boot_start; | ||
| int ret; | ||
|
|
||
| init_waitqueue_head(&sdev->boot_wait); | ||
|
|
@@ -143,6 +144,7 @@ int snd_sof_run_firmware(struct snd_sof_dev *sdev) | |
| } | ||
|
|
||
| dev_dbg(sdev->dev, "booting DSP firmware\n"); | ||
| boot_start = ktime_get(); | ||
|
|
||
| /* boot the firmware on the DSP */ | ||
| ret = snd_sof_dsp_run(sdev); | ||
|
|
@@ -171,7 +173,6 @@ int snd_sof_run_firmware(struct snd_sof_dev *sdev) | |
| if (sdev->fw_state == SOF_FW_BOOT_READY_FAILED) | ||
| return -EIO; /* FW boots but fw_ready op failed */ | ||
|
|
||
| dev_dbg(sdev->dev, "firmware boot complete\n"); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The firmware boot proper is done at this point to be pragmatic, from this point we have the post boot calls, which needs a running firmware on the DSP side... |
||
| sof_set_fw_state(sdev, SOF_FW_BOOT_COMPLETE); | ||
|
|
||
| /* set the DSP power state to D0 after successful firmware boot */ | ||
|
|
@@ -185,9 +186,13 @@ int snd_sof_run_firmware(struct snd_sof_dev *sdev) | |
| } | ||
|
|
||
| if (sdev->ipc->ops->post_fw_boot) | ||
| return sdev->ipc->ops->post_fw_boot(sdev); | ||
| ret = sdev->ipc->ops->post_fw_boot(sdev); | ||
|
|
||
| return 0; | ||
| if (!ret) | ||
| dev_dbg(sdev->dev, "firmware boot complete, took %lldus\n", | ||
| ktime_us_delta(ktime_get(), boot_start)); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are you fine with logging now the combined snd_sof_dsp_run() + snd_sof_dsp_post_fw_run() + sdev->ipc->ops->post_fw_boot() ? Note: the basefw boot time can be deduced based on the timestamps in kernel log: |
||
|
|
||
| return ret; | ||
| } | ||
| EXPORT_SYMBOL(snd_sof_run_firmware); | ||
|
|
||
|
|
||
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.
this should be the first patch.
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.
Uh, sorry, I put this last on purpose. Now fixed in updated series.