dmaengine Archive on lore.kernel.org
 help / color / Atom feed
From: Vinod Koul <vkoul@kernel.org>
To: Radhey Shyam Pandey <radheys@xilinx.com>
Cc: "dan.j.williams@intel.com" <dan.j.williams@intel.com>,
	Michal Simek <michals@xilinx.com>,
	"nick.graumann@gmail.com" <nick.graumann@gmail.com>,
	"andrea.merello@gmail.com" <andrea.merello@gmail.com>,
	Appana Durga Kedareswara Rao <appanad@xilinx.com>,
	"mcgrof@kernel.org" <mcgrof@kernel.org>,
	"dmaengine@vger.kernel.org" <dmaengine@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -next 3/8] dmaengine: xilinx_dma: Introduce xilinx_dma_get_residue
Date: Thu, 26 Sep 2019 10:18:01 -0700
Message-ID: <20190926171801.GM3824@vkoul-mobl> (raw)
In-Reply-To: <CH2PR02MB70008CE8600D98753BE1CC97C7860@CH2PR02MB7000.namprd02.prod.outlook.com>

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!

-- 
~Vinod

  reply index

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-05 16:36 [PATCH -next 0/8] AXI DMA driver improvements Radhey Shyam Pandey
2019-09-05 16:36 ` [PATCH -next 1/8] dmaengine: xilinx_dma: Remove desc_callback_valid check Radhey Shyam Pandey
2019-09-05 16:36 ` [PATCH -next 2/8] dmaengine: xilinx_dma: Merge get_callback and _invoke Radhey Shyam Pandey
2019-09-05 16:36 ` [PATCH -next 3/8] dmaengine: xilinx_dma: Introduce xilinx_dma_get_residue Radhey Shyam Pandey
2019-09-25 21:01   ` Vinod Koul
2019-09-26  5:52     ` Radhey Shyam Pandey
2019-09-26 17:18       ` Vinod Koul [this message]
2019-09-27  5:16         ` Radhey Shyam Pandey
2019-10-01 12:03           ` Radhey Shyam Pandey
2019-09-05 16:37 ` [PATCH -next 4/8] dmaengine: xilinx_dma: Add callback_result support Radhey Shyam Pandey
2019-09-05 16:37 ` [PATCH -next 5/8] dmaengine: xilinx_dma: Remove residue from channel data Radhey Shyam Pandey
2019-09-05 16:37 ` [PATCH -next 6/8] dmaengine: xilinx_dma: Print debug message when no free tx segments Radhey Shyam Pandey
2019-09-05 16:37 ` [PATCH -next 7/8] dmaengine: xilinx_dma: Check for both idle and halted state in axidma stop_transfer Radhey Shyam Pandey
2019-09-26 17:21   ` Vinod Koul
2019-09-27  6:48     ` Radhey Shyam Pandey
2019-09-27 13:57       ` Nicholas Graumann
2019-09-27 16:53         ` Radhey Shyam Pandey
2019-09-05 16:37 ` [PATCH -next 8/8] dmaengine: xilinx_dma: Clear desc_pendingcount in xilinx_dma_reset Radhey Shyam Pandey

Reply instructions:

You may reply publically 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=20190926171801.GM3824@vkoul-mobl \
    --to=vkoul@kernel.org \
    --cc=andrea.merello@gmail.com \
    --cc=appanad@xilinx.com \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=michals@xilinx.com \
    --cc=nick.graumann@gmail.com \
    --cc=radheys@xilinx.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

dmaengine Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/dmaengine/0 dmaengine/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dmaengine dmaengine/ https://lore.kernel.org/dmaengine \
		dmaengine@vger.kernel.org
	public-inbox-index dmaengine

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.dmaengine


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git