mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
To: Mark Brown <broonie@kernel.org>
Cc: Srinivas Kandagatla <srini@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	linux-sound@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	Mohit Sharma <mohit.sharma@oss.qualcomm.com>
Subject: Re: [PATCH v5 4/4] ASoC: qcom: q6apm-dai: add SCM buffer assignment for mDSP platforms
Date: Wed, 23 Sep 2026 16:50:51 +0530	[thread overview]
Message-ID: <2be528dd-487f-4093-a2eb-5916832a4123@oss.qualcomm.com> (raw)
In-Reply-To: <arJ0yBdeDfjYihRd@sirena.co.uk>



On 9/22/2026 6:00 PM, Mark Brown wrote:
>> On platforms such as Qualcomm Shikra, audio is served by the modem DSP
>> (mDSP) which runs in a stage-2 protected context. Unlike ADSP targets
>> where SMMU-mapped system RAM is directly accessible, the mDSP cannot
>> reach the PCM buffers unless they are explicitly SCM-assigned to the
>> appropriate Virtual Machine IDs (VMIDs). Without this assignment, audio
>> does not function on these platforms.
>> +static int q6apm_dai_scm_assign(struct q6apm_dai_data *pdata,
>> +				phys_addr_t addr, size_t size)
>> +{
>> +	r = &pdata->scm_regions[pdata->num_scm_regions++];
> This needs a lock.
> 
>> @@ -1021,6 +1168,7 @@ static int q6apm_dai_probe(struct platform_device *pdev)
>>   {
>> +			if (per_stream <= POS_BUFFER_BYTES + PAGE_SIZE) {
>> +				dev_err(dev,
>> +					"reserved-memory pool too small: %llu bytes\n",
>> +					(u64)rmem->size);
> %pa

Thanks Mark, fixed both in v6.

I added a mutex to serialize scm_regions[] / num_scm_regions updates in
q6apm_dai_scm_assign() and q6apm_dai_scm_unassign(), and changed the 
reserved-memory size diagnostic to use %pa

Thanks
Ajay Kumar Nandam

      reply	other threads:[~2026-09-23 11:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-21 19:08 [PATCH v5 0/4] ASoC: qcom: enable audio on stage-2 protected DSPs (mDSP) Ajay Kumar Nandam
2026-09-21 19:08 ` [PATCH v5 1/4] ASoC: qcom: q6apm: clear g_apm on driver removal Ajay Kumar Nandam
2026-09-21 19:08 ` [PATCH v5 2/4] ASoC: qcom: qdsp6: generalize GPR service domain Ajay Kumar Nandam
2026-09-21 19:08 ` [PATCH v5 3/4] dt-bindings: sound: qcom,q6apm-dai: add memory-region and relax iommus Ajay Kumar Nandam
2026-09-22 12:21   ` Mark Brown
2026-09-23 11:08     ` Ajay Kumar Nandam
2026-09-22 12:46   ` Rob Herring (Arm)
2026-09-23 11:12     ` Ajay Kumar Nandam
2026-09-23 11:57   ` Krzysztof Kozlowski
2026-09-21 19:08 ` [PATCH v5 4/4] ASoC: qcom: q6apm-dai: add SCM buffer assignment for mDSP platforms Ajay Kumar Nandam
2026-09-22 12:30   ` Mark Brown
2026-09-23 11:20     ` Ajay Kumar Nandam [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=2be528dd-487f-4093-a2eb-5916832a4123@oss.qualcomm.com \
    --to=ajay.nandam@oss.qualcomm.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=mohit.sharma@oss.qualcomm.com \
    --cc=perex@perex.cz \
    --cc=pierre-louis.bossart@linux.dev \
    --cc=robh@kernel.org \
    --cc=srini@kernel.org \
    --cc=tiwai@suse.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

all inboxes | Powered by JetHome®