[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b5oi5dcffzhrhpeqzfzoq5ztla2mzvaerij4262yunzozko2c6@bwayrzs7dumo>
Date: Wed, 24 Dec 2025 11:33:40 +0200
From: Dmitry Baryshkov <dmitry.baryshkov@....qualcomm.com>
To: Bartosz Golaszewski <brgl@...nel.org>
Cc: Vinod Koul <vkoul@...nel.org>, Jonathan Corbet <corbet@....net>,
Thara Gopinath <thara.gopinath@...il.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
"David S. Miller" <davem@...emloft.net>,
Udit Tiwari <quic_utiwari@...cinc.com>,
Daniel Perez-Zoghbi <dperezzo@...cinc.com>,
Md Sadre Alam <mdalam@....qualcomm.com>,
Dmitry Baryshkov <lumag@...nel.org>, dmaengine@...r.kernel.org,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-msm@...r.kernel.org, linux-crypto@...r.kernel.org,
Bartosz Golaszewski <bartosz.golaszewski@...aro.org>
Subject: Re: [PATCH v9 03/11] dmaengine: qcom: bam_dma: implement support for
BAM locking
On Wed, Dec 24, 2025 at 09:58:05AM +0100, Bartosz Golaszewski wrote:
> On Tue, Dec 23, 2025 at 9:19 PM Dmitry Baryshkov
> <dmitry.baryshkov@....qualcomm.com> wrote:
> >
> > On Tue, Dec 23, 2025 at 01:35:30PM +0100, Bartosz Golaszewski wrote:
> > > On Tue, Dec 23, 2025 at 11:45 AM Vinod Koul <vkoul@...nel.org> wrote:
> > > >
> > > > On 17-12-25, 15:31, Bartosz Golaszewski wrote:
> > > > > On Tue, Dec 16, 2025 at 4:11 PM Vinod Koul <vkoul@...nel.org> wrote:
> > > >
> > > > > >
> > > > > > I am trying to understand what the flag refers to and why do you need
> > > > > > this.. What is the problem that lock tries to solve
> > > > > >
> > > > >
> > > > > In the DRM use-case the TA will use the QCE simultaneously with linux.
> > > >
> > > > TA..?
> > >
> > > Trusted Application, the one to which we offload the decryption of the
> > > stream. That's not really relevant though.
> > >
> > > >
> > > > > It will perform register I/O with DMA using the BAM locking mechanism
> > > > > for synchronization. Currently linux doesn't use BAM locking and is
> > > > > using CPU for register I/O so trying to access locked registers will
> > > > > result in external abort. I'm trying to make the QCE driver use DMA
> > > > > for register I/O AND use BAM locking. To that end: we need to pass
> > > > > information about wanting the command descriptor to contain the
> > > > > LOCK/UNLOCK flag (this is what we set here in the hardware descriptor)
> > > > > from the QCE driver to the BAM driver. I initially used a global flag.
> > > > > Dmitry said it's too Qualcomm-specific and to use metadata instead.
> > > > > This is what I did in this version.
> > > >
> > > > Okay, how will client figure out should it set the lock or not? What are
> > > > the conditions where the lock is set or not set by client..?
> > > >
> > >
> > > I'm not sure what you refer to as "client". The user of the BAM engine
> > > - the crypto driver? If so - we convert it to always lock/unlock
> > > assuming the TA *may* use it and it's better to be safe. Other users
> > > are not affected.
> >
> > Just to confirm, we support QCE since IPQ4019 and MSM8996. Is lock
> > semantics supported on those platforms?
> >
>
> Yes, locking is supported on BAM since version 1.4. The only user of
> this feature right now is the crypto engine and even on IPQ4019 and
> MSM8996 the crypto BAM is version 1.7.
Ack, thanks for the confirmation.
For the record, BAM 1.3 is APQ8064, MSM8960 and IPQ8064.
>
> Bartosz
--
With best wishes
Dmitry
Powered by blists - more mailing lists