Skip to content

Commit

Permalink
ace: fix DSP panic during startup
Browse files Browse the repository at this point in the history
pm_device_runtime_get() must be called after pd_intel_adsp_init() is
called for each device, because the latter calls
pm_device_runtime_enable(), which sets the device runtime PM use
count to 0. The current wrong calling order causes a DSP panic
because of an unbalanced pm_device_runtime_put(). Fix this by
delaying pm_device_runtime_get() until the POST_KERNEL initialisation
step.

Fixes commit c3a6274 ("intel_adsp: ace: power: Prevent HST
domain power gating")

Signed-off-by: Guennadi Liakhovetski <[email protected]>
(cherry picked from commit 4204ca9)
  • Loading branch information
lyakh authored and tmleman committed Jan 24, 2024
1 parent 13baca5 commit 8068b71
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions soc/xtensa/intel_adsp/ace/multiprocessing.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,16 @@ void soc_mp_init(void)
IDC[i].agents[0].ipc.ctl = BIT(0); /* IPCTBIE */
}

int ret = pm_device_runtime_get(INTEL_ADSP_HST_DOMAIN_DEV);
ARG_UNUSED(ret);
__ASSERT(ret == 0, "HST power domain resume operation failed.");

/* Set the core 0 active */
soc_cpus_active[0] = true;
}

static int host_runtime_get(void)
{
return pm_device_runtime_get(INTEL_ADSP_HST_DOMAIN_DEV);
}
SYS_INIT(host_runtime_get, POST_KERNEL, 99);

#ifdef CONFIG_ADSP_IMR_CONTEXT_SAVE
/*
* Called after exiting D3 state when context restore is enabled.
Expand Down

0 comments on commit 8068b71

Please sign in to comment.