1
0

dsp: audio_prm: check if gpr is ready

During SSR, GPR will receive adsp down notification
first and set to SUBSYS_DOWN mode. Sometimes before
audio_prm received adsp down notification, prm_gpr_send_pkt
is called but it will get stucked in spf_core_is_apm_ready
for 30s and device crash happens. In audio_prm, before
checking if spf is ready, check if both prm and gpr are ready
to avoid getting stucked.

Change-Id: I851c140a07162e4fcf20353002ef0130441ca1db
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Este cometimento está contido em:
Meng Wang
2021-08-27 16:57:09 +08:00
ascendente fa58ae98f9
cometimento ffefd0f046
2 ficheiros modificados com 3 adições e 1 eliminações

Ver ficheiro

@@ -96,7 +96,8 @@ static int prm_gpr_send_pkt(struct gpr_pkt *pkt, wait_queue_head_t *wait)
mutex_unlock(&g_prm.lock);
return -ENODEV;
}
if (!is_apm_ready_check_done && g_prm.is_adsp_up) {
if (!is_apm_ready_check_done && g_prm.is_adsp_up &&
(gpr_get_q6_state() == GPR_SUBSYS_LOADED)) {
pr_info("%s: apm ready check not done\n", __func__);
retry = 0;
while (!spf_core_is_apm_ready() || retry < MAX_RETRY_COUNT) {