ipc4: handler: only set pm_prepare_D3 when CONFIG_PM is enabled - #11175
Open
dbaluta wants to merge 1 commit into
Open
ipc4: handler: only set pm_prepare_D3 when CONFIG_PM is enabled#11175dbaluta wants to merge 1 commit into
dbaluta wants to merge 1 commit into
Conversation
dbaluta
requested review from
kv2019i,
lbetlej,
lgirdwood,
mmaka1 and
plbossart
as code owners
September 7, 2026 13:21
pm_prepare_D3 gates ipc_send_queued_msg() and is only cleared from ipc_device_resume_handler(), which needs CONFIG_PM to run. On builds with CONFIG_PM=n no one clears it, so the IPC queue stalls after a SET_DX message. Guard the assignment with CONFIG_PM, like the task_mask handling just above. Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The change is narrowly scoped, matches existing nearby configuration-guard patterns, and directly prevents pm_prepare_D3 from blocking queued IPC sends on CONFIG_PM=n builds.
Pull request overview
This PR fixes an IPC4 power-management edge case where pm_prepare_D3 could be set on CONFIG_PM=n builds, but never cleared (because the resume path that clears it is only present when PM is enabled), causing ipc_send_queued_msg() to stop draining the IPC queue after a SET_DX message.
Changes:
- Wrap
ipc_get()->pm_prepare_D3 = 1;in#if defined(CONFIG_PM)within the IPC4SET_DXhandler. - Align
pm_prepare_D3handling with the adjacenttask_maskpowerdown gating logic already conditional onCONFIG_PM.
File summaries
| File | Description |
|---|---|
| src/ipc/ipc4/handler-kernel.c | Guards pm_prepare_D3 assignment behind CONFIG_PM to prevent IPC queue stalling on non-PM builds. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
PR 11175: test resultsRun date: 2026-09-07 13:49 UTC Tested commit: 38fb366031cef48434ebfc3f19dc5988c52a31e8 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
pm_prepare_D3 gates ipc_send_queued_msg() and is only cleared from ipc_device_resume_handler(), which needs CONFIG_PM to run. On builds with CONFIG_PM=n no one clears it, so the IPC queue stalls after a SET_DX message. Guard the assignment with CONFIG_PM, like the task_mask handling just above.