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

base_fw: add DMI_FORCE_L1_EXIT FW config (depends on Zephyr 66042) #8561

Merged
merged 2 commits into from
Dec 18, 2023

Conversation

fkwasowi
Copy link
Contributor

@fkwasowi fkwasowi commented Dec 1, 2023

Add new parameter for SW to force DMI L1 exit on IPC request.
Associated with: zephyrproject-rtos/zephyr#66042

Separating two new functions force and allow l1 to have the current state with separated functions in the power manager so that SOF can call these functions via IPC DMI_FORCE_L1_EXIT. DMA sometimes slows down and does not perform, therefore the workaround is to switch off l1. Change related to the addition of a new parameter to force DMI L1 exit on IPC request.

@kv2019i kv2019i changed the title base_fw: add DMI_FORCE_L1_EXIT FW config base_fw: add DMI_FORCE_L1_EXIT FW config (depends on Zephyr 66042) Dec 4, 2023
Copy link
Collaborator

@kv2019i kv2019i left a comment

Choose a reason for hiding this comment

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

Thanks, SOF side looks good, but Zephyr side PR needs to pass and be merged first.

src/audio/base_fw.c Show resolved Hide resolved
@fkwasowi fkwasowi force-pushed the prv-fkwasowi_l1_exit_ipc branch 2 times, most recently from 5c3955d to 25866d9 Compare December 8, 2023 09:10
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.

@fkwasowi pls ping once Zephyr side merged and then we can merge here..

@lgirdwood lgirdwood added this to the v2.9 milestone Dec 8, 2023
@fkwasowi fkwasowi force-pushed the prv-fkwasowi_l1_exit_ipc branch 2 times, most recently from 2ebbfb3 to 8d311ef Compare December 13, 2023 11:09
Copy link
Contributor

@iganakov iganakov left a comment

Choose a reason for hiding this comment

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

Looks good to me

@marc-hb marc-hb mentioned this pull request Dec 13, 2023
Copy link
Collaborator

@kv2019i kv2019i left a comment

Choose a reason for hiding this comment

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

I'm afraid we have multiple build errors for "lnl" and "tgl". We need a fixup to Zephyr upstream, it seems the L1_EXIT define is not available for lnl and for "tgl" inclusion of adsp_shim.h is causing problems.

Copy link
Collaborator

@kv2019i kv2019i left a comment

Choose a reason for hiding this comment

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

Zephyr PR is now good and lnl compiles but still some issues on the SOF side changes, please see inline (and CI results).

src/audio/base_fw.c Show resolved Hide resolved
src/audio/base_fw.c Show resolved Hide resolved
@fkwasowi fkwasowi force-pushed the prv-fkwasowi_l1_exit_ipc branch 2 times, most recently from 3b52b65 to f10fb9c Compare December 18, 2023 08:07
intel_adsp: lnl: add missing definition for lnl
28d5d23a232b69b213112e723e0a6392cbd5a47e

Signed-off-by: Fabiola Kwasowiec <fabiola.kwasowiec@intel.com>
@kv2019i
Copy link
Collaborator

kv2019i commented Dec 18, 2023

@fkwasowi The tgl/tgl-h still seems to fail, can you check:
https://github.com/thesofproject/sof/actions/runs/7245402754/job/19736029658?pr=8561

Copy link
Collaborator

@kv2019i kv2019i left a comment

Choose a reason for hiding this comment

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

Code looks good now. One suggestion about how to handle platforms that do not support this feature. I wonder if return an error would be more future-proof, but this is not blocking issue to me.


if (force) {
tr_info(&basefw_comp_tr, "FW config set force dmi l0 state");
#if defined(CONFIG_SOC_SERIES_INTEL_ACE)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure what to return if the functionality is not available. Alternatively you could #ifdef the whole funciton body and at the end:

#if defined(CONFIG_SOC_SERIES_INTEL_ACE)
const uint32_t force = ..
...
#else
return IPC4_UNAVAILABLE;
#endif

Add new parameter for SW to force DMI L1 exit on IPC request.

Signed-off-by: Fabiola Kwasowiec <fabiola.kwasowiec@intel.com>
@kv2019i kv2019i merged commit b3b9abf into thesofproject:main Dec 18, 2023
44 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.

5 participants