-
Notifications
You must be signed in to change notification settings - Fork 350
byt: ipc: Move WFI to run level 0 #2137
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
Conversation
|
Fixes #2123 |
When entering runtime suspend or system suspend, the host driver sends a CTX_SAVE IPC. When this IPC is received, the FW should call wait_for_interrupt from run level 0. The IPC task is not at run level 0, therefore this should be done in the main audio task, which runs at level 0. Additionally, in the case of baytrail, the DSP doesn't enter D3 in the case of runtime suspend. So, when the host tries to resume the DSP, the pm_prepare_D3 flag is not reset to 0. So, we need to explicitly reset it to 0 when the host sends the CTX_RESTORE IPC. Signed-off-by: Ranjani Sridharan <[email protected]>
|
SOFCI TEST |
|
This looks good, but does IPC_CTX_RESTORE really work with this simple change? I think at least we need re-enable interrupts and timers there? |
@keyonjie its possible we're missing something more which is whats causing the IPC timeouts now. But whats unclear to me is if we are WFI(0) when we receive the CTX_SAVE IPC and the host resets the DSP, loads the FW and boots the FW again, do the interrupts and timers get re-enabled? |
Yes, the wording "context save" here is somewhat confusing, with general understanding, what we do in "context save" should be symmetric with "context restore". |
lgirdwood
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 same change could be done for BDW too.
@ranj063 does a DSP reset happen always after a "resume?" If so, that doesn't sound like a real resume to me, that's more like a power off / power on cycle? But in some cases we do proper suspending / resuming, e.g. for WoV? |
lyakh
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.
For what it does, the PR LGTM, but it would be good to get some understanding of the resume process - in which cases we do and don't reset the DSP as a part of a "resume" process? As far as I understand this PR isn't a complete fix and we still need to fix sporadic boot failures, mentioned in #2123?
|
SOFCI TEST |
|
CI usual false positives. |
When entering runtime suspend or system suspend, the host
driver sends a CTX_SAVE IPC. When this IPC is received,
the FW should call wait_for_interrupt from run level 0.
The IPC task is not at run level 0, therefore this
should be done in the main audio task, which runs at level 0.
Additionally, in the case of baytrail, the DSP doesn't
enter D3 in the case of runtime suspend. So, when the host
tried to resume the DSP, the pm_prepare_D3 flag is not reset
to 0. So, we need to explicitly reset it to 0 when the
host sends the CTX_RESTORE IPC.
Signed-off-by: Ranjani Sridharan [email protected]