[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210201064314.GM2771@vkoul-mobl>
Date: Mon, 1 Feb 2021 12:13:14 +0530
From: Vinod Koul <vkoul@...nel.org>
To: mdalam@...eaurora.org
Cc: corbet@....net, agross@...nel.org, bjorn.andersson@...aro.org,
dan.j.williams@...el.com, dmaengine@...r.kernel.org,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-msm@...r.kernel.org, sricharan@...eaurora.org,
mdalam=codeaurora.org@...eaurora.org
Subject: Re: [PATCH] dmaengine: qcom: bam_dma: Add LOCK and UNLOCK flag bit
support
On 01-02-21, 11:52, mdalam@...eaurora.org wrote:
> On 2021-02-01 11:35, Vinod Koul wrote:
> > On 27-01-21, 23:56, mdalam@...eaurora.org wrote:
> > > The actual LOCK/UNLOCK flag should be set on hardware command
> > > descriptor.
> > > so this flag setting should be done in DMA engine driver. The user
> > > of the
> > > DMA
> > > driver like (in case of IPQ5018) Crypto can use flag
> > > "DMA_PREP_LOCK" &
> > > "DMA_PREP_UNLOCK"
> > > while preparing CMD descriptor before submitting to the DMA
> > > engine. In DMA
> > > engine driver
> > > we are checking these flasgs on CMD descriptor and setting actual
> > > LOCK/UNLOCK flag on hardware
> > > descriptor.
> >
> >
> > I am not sure I comprehend this yet.. when is that we would need to do
> > this... is this for each txn submitted to dmaengine.. or something
> > else..
>
> Its not for each transaction submitted to dmaengine. We have to set this
> only
> once on CMD descriptor. So when A53 crypto driver need to change the crypto
> configuration
> then first it will lock the all other pipes using setting the LOCK flag bit
> on CMD
> descriptor and then it can start the transaction , on data descriptor this
> flag will
> not get set once all transaction will be completed the A53 crypto driver
> release the lock on
> all other pipes using UNLOCK flag on CMD descriptor. So LOCK/UNLOCK will be
> only once and not for
> the each transaction.
Okay so why cant the bam driver check cmd descriptor and do lock/unlock
as below, why do we need users to do this.
if (flags & DMA_PREP_CMD) {
do_lock_bam();
The point here is that this seems to be internal to dma and should be
handled by dma driver.
Also if we do this, it needs to be done for specific platforms..
Thanks
--
~Vinod
Powered by blists - more mailing lists