From: sashiko-bot@kernel.org
To: "Shawn Guo" <shengchao.guo@oss.qualcomm.com>
Cc: linux-sound@vger.kernel.org
Subject: Re: [PATCH v2 3/3] ASoC: qcom: q6prm: Keep the clock controller across DSP restarts
Date: Mon, 30 Nov 2026 08:06:48 +0000 [thread overview]
Message-ID: <sashiko-outbox-240663@kernel.org> (raw)
In-Reply-To: <20261130075333.43354-4-shengchao.guo@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [High] ASoC: qcom: q6prm: prm_probe() restores clocks before
gpr_callback is set
--
commit 4a0bb2e6ab244980f0fc54a884204fab1b98a0d5
Author: Shawn Guo <shengchao.guo@oss.qualcomm.com>
ASoC: qcom: q6prm: Keep the clock controller across DSP restarts
This commit keeps the q6prm clock controller platform device alive across
DSP restarts under the remoteproc platform device, detaching the q6prm
instance on remove and reattaching and restoring prepared clocks on probe.
> diff --git a/sound/soc/qcom/qdsp6/q6prm.c b/sound/soc/qcom/qdsp6/q6prm.c
> index 73b5a96e83119..861d48bdb5eaf 100644
> --- a/sound/soc/qcom/qdsp6/q6prm.c
> +++ b/sound/soc/qcom/qdsp6/q6prm.c
[ ... ]
> @@ -230,7 +350,29 @@ static int prm_probe(gpr_device_t *gdev)
> if (!q6apm_is_adsp_ready())
> return -EPROBE_DEFER;
>
> - return devm_of_platform_populate(dev);
> + ret = q6prm_clkctl_attach(cc);
> + if (ret)
> + return ret;
> +
> + if (cc->clkctl)
> + q6dsp_clock_dsp_up(&cc->clkctl->pdev->dev);
> +
> + return 0;
> +}
[Severity: High]
Can q6dsp_clock_dsp_up() receive GPR responses when called from
prm_probe()?
apr_device_probe() only installs adrv->gpr_callback into
adev->svc.callback after adrv->probe() returns 0:
drivers/soc/qcom/apr.c:apr_device_probe() {
...
ret = adrv->probe(adev);
if (!ret)
adev->svc.callback = adrv->gpr_callback;
...
}
While prm_probe() is running, gdev->svc.callback is still NULL, so
gpr_do_rx_callback() drops any incoming DSP reply without calling
prm_callback(). Every lost clock that q6dsp_clock_dsp_up() tries to
restore via q6prm_send_cmd_sync() will wait 5 seconds and fail with
-ETIMEDOUT, and the same applies to any clock request sent once
q6prm_clkctl_attach() publishes ctl->prm and creates ctl->pdev before
prm_probe() returns.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261130075333.43354-1-shengchao.guo@oss.qualcomm.com?part=3
prev parent reply other threads:[~2026-11-30 8:06 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 7:53 [PATCH v2 0/3] ASoC: qcom: qdsp6: Fix audio after an ADSP restart Shawn Guo
2026-11-30 7:53 ` [PATCH v2 1/3] ASoC: qcom: q6apm: Wait for SPF to be ready before registering Shawn Guo
2026-11-30 8:18 ` sashiko-bot
2026-11-30 7:53 ` [PATCH v2 2/3] ASoC: qcom: q6dsp-lpass-clocks: Restore clocks after a DSP restart Shawn Guo
2026-11-30 7:53 ` [PATCH v2 3/3] ASoC: qcom: q6prm: Keep the clock controller across DSP restarts Shawn Guo
2026-11-30 8:06 ` sashiko-bot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sashiko-outbox-240663@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=shengchao.guo@oss.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox