Skip to content

ipc4: handler: only set pm_prepare_D3 when CONFIG_PM is enabled - #11175

Open
dbaluta wants to merge 1 commit into
thesofproject:mainfrom
dbaluta:ipc4-imx-pm-prepare-d3-guard
Open

ipc4: handler: only set pm_prepare_D3 when CONFIG_PM is enabled#11175
dbaluta wants to merge 1 commit into
thesofproject:mainfrom
dbaluta:ipc4-imx-pm-prepare-d3-guard

Conversation

@dbaluta

@dbaluta dbaluta commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

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.

Copilot AI lite review requested due to automatic review settings 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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 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 IPC4 SET_DX handler.
  • Align pm_prepare_D3 handling with the adjacent task_mask powerdown gating logic already conditional on CONFIG_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.

@intel-sofci

Copy link
Copy Markdown

PR 11175: test results

Run date: 2026-09-07 13:49 UTC

Tested commit: 38fb366031cef48434ebfc3f19dc5988c52a31e8

mtl pass rate lnl pass rate ptl pass rate wcl pass rate nvl pass rate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants