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

[SOF2.9] backport fixes from Zephyr main #77

Conversation

kv2019i
Copy link
Collaborator

@kv2019i kv2019i commented Mar 4, 2024

First set of fixes that have a clear fixed issue mentioned in git commit and are merged to Zephyr mainline.

RanderWang and others added 4 commits March 4, 2024 18:43
According to hardware spec, host dma needs some delay to completely stop.
In the bug the host dma is disabled in different path in a few microseonds.
The first setting disabled the host dma and called pm_device_runtime_put
to power off it. The second setting found the host dma was still alive
and calle pm_device_runtime_put again. This results to pm->usage
checking failed.

BugLink: thesofproject/sof#8686
Signed-off-by: Rander Wang <[email protected]>
(cherry picked from commit e021ccf)
Commit b2eaa6448076 ("drivers: dma: intel-adsp-hda: add delay to stop
host dma") added a wait on GBUSY state to host DMA stop.

This is problematic as in some case (like SOF chain-DMA usage),
the host DMA side RUN bit is not cleared when intel_adsp_hda_dma_stop()
is called. It is not possible to wait on GBUSY bit as there are
valid cases where it can remain set.

Address the original problem described in SOF bug zephyrproject-rtos#8686 and add a
polling check for intel_adsp_hda_is_enabled(). As per the bug
description, in some cases the GEN/FIFORDY bits are not cleared
immediately and if a new call to intel_adsp_hda_dma_stop() is made, the
PM refcounting will go haywire.

Link: thesofproject/sof#8686
Signed-off-by: Kai Vehmanen <[email protected]>
(cherry picked from commit 00d4661)
When exiting PM_STATE_SOFT_OFF, the primary core state is always
used to restore bootctl register and the clock and power gating
settings.

This can lead to problems if non-primary core is powered up and down
many times before primary core 0 is powered down the first time.
The saved state in core_desc[0].bctl will be null, and as a result-
power gating and clock gating is not disabled correctly for
non-primary cores.

Link: thesofproject/sof#8642
Signed-off-by: Kai Vehmanen <[email protected]>
(cherry picked from commit a8af622)
Fix the log level of two LOG_ERR() statements which should have always
been LOG_INF(). As confirmed by the author Adrian in zephyrproject-rtos#60172

Fixes commit 3fbaed4 ("dai: intel: ace: dmic: Refactor of
dai_nhlt_dmic_dai_params_get function")

Signed-off-by: Marc Herbert <[email protected]>
(cherry picked from commit 8042e73)
@kv2019i
Copy link
Collaborator Author

kv2019i commented Mar 5, 2024

Tested in thesofproject/sof#8899

@kv2019i kv2019i merged commit 337b518 into thesofproject:sof/stable-v2.9 Mar 5, 2024
8 of 9 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.

3 participants