Skip to content

Conversation

@tmleman
Copy link
Contributor

@tmleman tmleman commented Oct 24, 2025

Add error handling for platform_boot_complete() during D3 exit to improve debugging capabilities.

Previously, platform_boot_complete() could fail silently if the DSP entered D3 state with an invalid IPC driver state, making it difficult to identify the root cause of issues. This change captures the return value and triggers a panic with a clear error message when the function fails.

This improvement makes debugging easier by explicitly indicating when the boot completion fails after resuming from D3, rather than allowing execution to continue with potential undefined behavior.

Add error handling for platform_boot_complete() during D3 exit to
improve debugging capabilities.

Previously, platform_boot_complete() could fail silently if the DSP
entered D3 state with an invalid IPC driver state, making it difficult
to identify the root cause of issues. This change captures the return
value and triggers a panic with a clear error message when the function
fails.

This improvement makes debugging easier by explicitly indicating when
the boot completion fails after resuming from D3, rather than allowing
execution to continue with potential undefined behavior.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
Copilot AI review requested due to automatic review settings October 24, 2025 14:36
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds error handling for platform_boot_complete() during D3 state exit to improve debugging capabilities. Previously, this function could fail silently, making it difficult to identify issues when the DSP resumed from D3 state with an invalid IPC driver state.

Key Changes:

  • Added return value checking for platform_boot_complete() call
  • Added error logging and panic trigger when boot completion fails

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +214 to +216
int ret = platform_boot_complete(0);

if (ret) {
Copy link

Copilot AI Oct 24, 2025

Choose a reason for hiding this comment

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

[nitpick] The variable ret is declared inside a conditional block. Consider declaring it at the beginning of the function or the encompassing scope to improve code readability and maintain consistency with common C coding practices.

Copilot uses AI. Check for mistakes.
Copy link
Collaborator

@softwarecki softwarecki left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@lgirdwood lgirdwood left a comment

Choose a reason for hiding this comment

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

@tmleman can you check internal CI. Thanks !

@tmleman
Copy link
Contributor Author

tmleman commented Oct 28, 2025

@tmleman can you check internal CI. Thanks !

Same as here: #10327 (comment)

@tmleman
Copy link
Contributor Author

tmleman commented Oct 30, 2025

@lgirdwood internal CI issue has been resolved.

@abonislawski abonislawski merged commit f27d605 into thesofproject:main Oct 30, 2025
39 of 45 checks passed
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.

7 participants