Revert "ipc: Remove adsp/modem up check in gpr_send_pkt"
It was found that sending GPR command before audio process
domain can lead to deadlock in ADSP. Reinstate the check to
send GPR command only when gpr-lite is informed that process
domain is up.This reverts commit
2922723c6f
.
Change-Id: I8076dc053c2d7c5b84bdafa2feb35462b2309227
Этот коммит содержится в:
@@ -1,4 +1,4 @@
|
||||
/* Copyright (c) 2011-2017, 2019-2020 The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2011-2017, 2019-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2018, Linaro Limited
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -105,6 +105,18 @@ int gpr_send_pkt(struct gpr_device *adev, struct gpr_pkt *pkt)
|
||||
|
||||
gpr = dev_get_drvdata(adev->dev.parent);
|
||||
|
||||
if ((adev->domain_id == GPR_DOMAIN_ADSP) &&
|
||||
(gpr_get_q6_state() != GPR_SUBSYS_LOADED)) {
|
||||
dev_err(gpr->dev,"%s: domain_id[%d], Still Dsp is not Up\n",
|
||||
__func__, adev->domain_id);
|
||||
return -ENETRESET;
|
||||
} else if ((adev->domain_id == GPR_DOMAIN_MODEM) &&
|
||||
(gpr_get_modem_state() == GPR_SUBSYS_DOWN)) {
|
||||
dev_err(gpr->dev, "%s: domain_id[%d], Still Modem is not Up\n",
|
||||
__func__, adev->domain_id );
|
||||
return -ENETRESET;
|
||||
}
|
||||
|
||||
spin_lock_irqsave(&adev->lock, flags);
|
||||
|
||||
hdr = &pkt->hdr;
|
||||
|
Ссылка в новой задаче
Block a user