lkml.org 
[lkml]   [2019]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH -next 3/8] dmaengine: xilinx_dma: Introduce xilinx_dma_get_residue
Date
> -----Original Message-----
> From: Vinod Koul <vkoul@kernel.org>
> Sent: Thursday, September 26, 2019 10:48 PM
> To: Radhey Shyam Pandey <radheys@xilinx.com>
> Cc: dan.j.williams@intel.com; Michal Simek <michals@xilinx.com>;
> nick.graumann@gmail.com; andrea.merello@gmail.com; Appana Durga
> Kedareswara Rao <appanad@xilinx.com>; mcgrof@kernel.org;
> dmaengine@vger.kernel.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH -next 3/8] dmaengine: xilinx_dma: Introduce
> xilinx_dma_get_residue
>
> On 26-09-19, 05:52, Radhey Shyam Pandey wrote:
>
> > > > + * VDMA and simple mode do not support residue reporting, so the
> > > > + * residue field will always be 0.
> > > > + */
> > > > + if (chan->xdev->dma_config->dmatype == XDMA_TYPE_VDMA ||
> > > !chan->has_sg)
> > > > + return residue;
> > >
> > > why not check this in status callback?
> > Assuming we mean to move vdma and non-sg check to
> xilinx_dma_tx_status.
> > Just a thought- Keeping this check in xilinx_dma_get_residue provides
> > an abstraction and caller can simply call this func with knowing about
> > IP config specific residue calculation. Considering this point does it
> > looks ok ?
>
> well you are checking either way, so calling the lower level function
> only when you need it makes more sense!

Sure, will do it in v2.
>
> --
> ~Vinod

\
 
 \ /
  Last update: 2019-09-27 07:17    [W:0.058 / U:10.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site