mirror of https://github.com/thesofproject/sof.git
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 <tomasz.m.leman@intel.com>
This commit is contained in:
parent
478cea5b3d
commit
9b4a618c52
|
@ -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);
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include <sof_versions.h>
|
||||
#include <stdint.h>
|
||||
#include <zephyr/pm/policy.h>
|
||||
#include <sof/ipc/driver.h>
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue