From c07e87c00d495651f0849599d126a07a0d628638 Mon Sep 17 00:00:00 2001 From: Tomasz Leman Date: Wed, 24 May 2023 10:49:41 +0200 Subject: [PATCH 1/2] west.yml: upgrade zephyr to 7d54586751 Zepych update: total of 228 commits. Changes include: - build LNL with Zephyr SDK, - MMU initial implementation, - check for pending ack in intel_adsp_ipc_is_complete. Signed-off-by: Tomasz Leman --- west.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/west.yml b/west.yml index 25044ad469cd..2eb2994bf226 100644 --- a/west.yml +++ b/west.yml @@ -43,7 +43,7 @@ manifest: - name: zephyr repo-path: zephyr - revision: ca3dd23846c2aeb7c20c872627113de370060522 + revision: 7d54586751cfe405d2cdcfd850f8100bc9844f63 remote: zephyrproject # Import some projects listed in zephyr/west.yml@revision From ab1fafc24adc2c3bf057410e5a8a91fd82a86bcb Mon Sep 17 00:00:00 2001 From: Tomasz Leman Date: Mon, 15 May 2023 14:49:13 +0200 Subject: [PATCH 2/2] pm: policy: d0i3: wait for ipc ack before pg The DSP cannot enter the power gating state if it has not yet received an ack from host after sending an ipc message. Signed-off-by: Tomasz Leman --- src/ipc/ipc-zephyr.c | 5 +++++ zephyr/lib/pm_runtime.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ipc/ipc-zephyr.c b/src/ipc/ipc-zephyr.c index a6b6bff16d5c..85c6656a143c 100644 --- a/src/ipc/ipc-zephyr.c +++ b/src/ipc/ipc-zephyr.c @@ -184,6 +184,11 @@ void ipc_platform_send_msg_direct(const struct ipc_msg *msg) intel_adsp_ipc_send_message_emergency(INTEL_ADSP_IPC_HOST_DEV, hdr->pri, hdr->ext); } +int ipc_platform_poll_is_host_ready(void) +{ + return intel_adsp_ipc_is_complete(INTEL_ADSP_IPC_HOST_DEV); +} + int platform_ipc_init(struct ipc *ipc) { ipc_set_drvdata(ipc, NULL); diff --git a/zephyr/lib/pm_runtime.c b/zephyr/lib/pm_runtime.c index ab8adea565c0..bfe13e0ccdd2 100644 --- a/zephyr/lib/pm_runtime.c +++ b/zephyr/lib/pm_runtime.c @@ -10,6 +10,7 @@ #include #include #include +#include LOG_MODULE_REGISTER(power, CONFIG_SOF_LOG_LEVEL); @@ -46,7 +47,7 @@ const struct pm_state_info *pm_policy_next_state(uint8_t cpu, int32_t ticks) continue; /* skipping when some ipc task is not finished */ - if (ipc_get()->task_mask) + if (ipc_get()->task_mask || !ipc_platform_poll_is_host_ready()) continue; }