linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Sia, Jee Heng" <jee.heng.sia@intel.com>
To: Vinod Koul <vkoul@kernel.org>
Cc: "Eugeniy.Paltsev@synopsys.com" <Eugeniy.Paltsev@synopsys.com>,
	"andriy.shevchenko@linux.intel.com" 
	<andriy.shevchenko@linux.intel.com>,
	"dmaengine@vger.kernel.org" <dmaengine@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v2 09/15] dmaengine: dw-axi-dmac: Support burst residue granularity
Date: Wed, 11 Nov 2020 01:44:23 +0000	[thread overview]
Message-ID: <CO1PR11MB5026C04E7F8DA29F87268D3CDAE80@CO1PR11MB5026.namprd11.prod.outlook.com> (raw)
In-Reply-To: <20201109095115.GD3171@vkoul-mobl>



> -----Original Message-----
> From: Vinod Koul <vkoul@kernel.org>
> Sent: 09 November 2020 5:51 PM
> To: Sia, Jee Heng <jee.heng.sia@intel.com>
> Cc: Eugeniy.Paltsev@synopsys.com; andriy.shevchenko@linux.intel.com;
> dmaengine@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH v2 09/15] dmaengine: dw-axi-dmac: Support burst residue
> granularity
> 
> On 27-10-20, 14:38, Sia Jee Heng wrote:
> > Add support for DMA_RESIDUE_GRANULARITY_BURST so that AxiDMA can
> > report DMA residue.
> >
> > Existing AxiDMA driver only support data transfer between memory to
> > memory operation, therefore reporting DMA residue to the DMA clients
> > is not supported.
> >
> > Reporting DMA residue to the DMA clients is important as DMA clients
> > shall invoke dmaengine_tx_status() to understand the number of bytes
> > been transferred so that the buffer pointer can be updated accordingly.
> >
> > Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > Signed-off-by: Sia Jee Heng <jee.heng.sia@intel.com>
> > ---
> >  .../dma/dw-axi-dmac/dw-axi-dmac-platform.c    | 44 ++++++++++++++++---
> >  drivers/dma/dw-axi-dmac/dw-axi-dmac.h         |  2 +
> >  2 files changed, 39 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
> > b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
> > index 011cf7134f25..cd99557a716c 100644
> > --- a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
> > +++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
> > @@ -265,14 +265,36 @@ dma_chan_tx_status(struct dma_chan *dchan,
> dma_cookie_t cookie,
> >  		  struct dma_tx_state *txstate)
> >  {
> >  	struct axi_dma_chan *chan = dchan_to_axi_dma_chan(dchan);
> > -	enum dma_status ret;
> > +	struct virt_dma_desc *vdesc;
> > +	enum dma_status status;
> > +	u32 completed_length;
> > +	unsigned long flags;
> > +	u32 completed_blocks;
> > +	size_t bytes = 0;
> > +	u32 length;
> > +	u32 len;
> >
> > -	ret = dma_cookie_status(dchan, cookie, txstate);
> > +	status = dma_cookie_status(dchan, cookie, txstate);
> 
> txstate can be null, so please check that as well in the below condition and
> return if that is the case
[>>] noted. Will factor in the null condition check in v3
> 
> --
> ~Vinod

  reply	other threads:[~2020-11-11  1:44 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-27  6:38 [PATCH v2 00/15] dmaengine: dw-axi-dmac: support Intel KeemBay AxiDMA Sia Jee Heng
2020-10-27  6:38 ` [PATCH v2 01/15] dt-bindings: dma: Add YAML schemas for dw-axi-dmac Sia Jee Heng
2020-11-09  9:26   ` Vinod Koul
2020-11-11  1:36     ` Sia, Jee Heng
2020-10-27  6:38 ` [PATCH v2 02/15] dmaengine: dw-axi-dmac: simplify descriptor management Sia Jee Heng
2020-10-27  6:38 ` [PATCH v2 03/15] dmaengine: dw-axi-dmac: move dma_pool_create() to alloc_chan_resources() Sia Jee Heng
2020-10-27  6:38 ` [PATCH v2 04/15] dmaengine: dw-axi-dmac: Add device_synchronize() callback Sia Jee Heng
2020-10-27  6:38 ` [PATCH v2 05/15] dmaengine: dw-axi-dmac: Add device_config operation Sia Jee Heng
2020-10-27  6:38 ` [PATCH v2 06/15] dmaengine: dw-axi-dmac: Support device_prep_slave_sg Sia Jee Heng
2020-10-27  6:38 ` [PATCH v2 07/15] dmaegine: dw-axi-dmac: Support device_prep_dma_cyclic() Sia Jee Heng
2020-11-09  9:42   ` Vinod Koul
2020-11-11  1:38     ` Sia, Jee Heng
2020-10-27  6:38 ` [PATCH v2 08/15] dmaengine: dw-axi-dmac: Support of_dma_controller_register() Sia Jee Heng
2020-10-27  6:38 ` [PATCH v2 09/15] dmaengine: dw-axi-dmac: Support burst residue granularity Sia Jee Heng
2020-11-09  9:51   ` Vinod Koul
2020-11-11  1:44     ` Sia, Jee Heng [this message]
2020-10-27  6:38 ` [PATCH v2 10/15] dmaengine: dw-axi-dmac: Add Intel KeemBay AxiDMA support Sia Jee Heng
2020-10-27  6:38 ` [PATCH v2 11/15] dt-binding: dma: dw-axi-dmac: Add support for Intel KeemBay AxiDMA Sia Jee Heng
2020-11-09  9:54   ` Vinod Koul
2020-11-11  1:50     ` Sia, Jee Heng
2020-10-27  6:38 ` [PATCH v2 12/15] dmaengine: dw-axi-dmac: Add Intel KeemBay DMA register fields Sia Jee Heng
2020-11-09  9:57   ` Vinod Koul
2020-11-11  1:53     ` Sia, Jee Heng
2020-10-27  6:38 ` [PATCH v2 13/15] dmaengine: dw-axi-dmac: Add Intel KeemBay AxiDMA handshake Sia Jee Heng
2020-10-27  6:38 ` [PATCH v2 14/15] dmaengine: dw-axi-dmac: Add Intel KeemBay AxiDMA BYTE and HALFWORD registers Sia Jee Heng
2020-10-27  6:38 ` [PATCH v2 15/15] dmaengine: dw-axi-dmac: Set constraint to the Max segment size Sia Jee Heng

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=CO1PR11MB5026C04E7F8DA29F87268D3CDAE80@CO1PR11MB5026.namprd11.prod.outlook.com \
    --to=jee.heng.sia@intel.com \
    --cc=Eugeniy.Paltsev@synopsys.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vkoul@kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).