Skip to content
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

intel_adsp: ace: power: prevent HST (HOST) domain power gating #67393

Conversation

tmleman
Copy link
Collaborator

@tmleman tmleman commented Jan 9, 2024

This commit introduces a mechanism to prevent the power gating of the HST (Host) power domain when the primary core of the audio DSP is active. The power gating prevention is crucial for maintaining the functionality of the HST domain while the primary DSP core is performing critical tasks.

andyross
andyross previously approved these changes Jan 9, 2024
Copy link
Contributor

@andyross andyross left a comment

Choose a reason for hiding this comment

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

Oh good. This was one of the mystery patches from mtl-007-drop-stable I've been whining about out-of-band. :)

Code looks fine to me, though again I try not to pontificate on Intel hardware out of propriety (not my job anymore!). One nitpick about assert-vs-panic hygiene.

soc/xtensa/intel_adsp/ace/power.c Outdated Show resolved Hide resolved
@tmleman tmleman changed the title intel_adsp: ace: power: prevent hst domain power gating intel_adsp: ace: power: prevent HST (HOST) domain power gating Jan 10, 2024
This patch introduces power management for the HOST (HST) domain within
the Intel ADSP ACE IP. It adds macros to access the node identifier and
device pointer for the HST power domain and integrates power management
calls into the system initialization and power state transition
functions.

The patch ensures that power gating of the HST domain is prevented when
the primary core of the audio DSP is active. Preventing power gating is
crucial for maintaining the functionality of the HST domain while the
primary DSP core is performing critical tasks.

Signed-off-by: Tomasz Leman <[email protected]>
@tmleman tmleman force-pushed the topic/upstarem/pr/intel_adsp/ace/power/hst_domain branch from d498b8b to 0469359 Compare January 10, 2024 16:05
@tmleman tmleman force-pushed the topic/upstarem/pr/intel_adsp/ace/power/hst_domain branch from 0469359 to e46330f Compare January 10, 2024 16:11
This patch enhances the power-down sequence for the HOST (HST) domain
within the Intel ADSP ACE 1.5 architecture. It introduces a check to
ensure that a specific condition, represented by a magic key value, is
met before disabling the HST domain. This additional verification step
ensures that the HST domain is only powered down when it is safe to do
so, thereby maintaining the stability and reliability of the system.

Signed-off-by: Tomasz Leman <[email protected]>
@tmleman tmleman force-pushed the topic/upstarem/pr/intel_adsp/ace/power/hst_domain branch from e46330f to 37f4c95 Compare January 10, 2024 16:16
Copy link
Contributor

@andyross andyross left a comment

Choose a reason for hiding this comment

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

Refresh +1

@nashif nashif removed the request for review from aborisovich January 10, 2024 21:15
@carlescufi carlescufi merged commit 1c0c900 into zephyrproject-rtos:main Jan 11, 2024
16 checks passed
@marc-hb
Copy link
Collaborator

marc-hb commented Jan 12, 2024

According to @lyakh 's test results in thesofproject/sof#8732 and thesofproject/sof#8180 (comment) (deep link in unrelated PR with more analysis) this commit is causing DSP panics.

Please always submit such changes to SOF CI before merge, it's just a one-line change in sof/west.yml in a SOF draft PR (examples: thesofproject/sof#8736, thesofproject/sof#8732, thesofproject/sof@cea422d53b863ee, etc.)

Regressions like this are holding back everyone else, it's really unproductive and they can be caught before merge very easily.

@marc-hb
Copy link
Collaborator

marc-hb commented Jan 16, 2024

Thanks @lyakh for the fix:

@@ -9,6 +9,10 @@
#include <zephyr/pm/device_runtime.h>
#include <adsp_shim.h>

#if CONFIG_ACE_VERSION_1_5
Copy link
Collaborator

Choose a reason for hiding this comment

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

SOF Kconfig, fix submitted in #67933

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

Successfully merging this pull request may close these issues.

8 participants