public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vinod Koul <vkoul@kernel.org>
To: Miquel Raynal <miquel.raynal@bootlin.com>
Cc: Lizhi Hou <lizhi.hou@amd.com>, Brian Xu <brian.xu@amd.com>,
	Raj Kumar Rampelli <raj.kumar.rampelli@amd.com>,
	Michal Simek <michal.simek@amd.com>,
	dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] dmaengine: xilinx: xdma: Support cyclic transfers
Date: Thu, 28 Sep 2023 16:24:31 +0530	[thread overview]
Message-ID: <ZRVbZwQz13hL2QfY@matsya> (raw)
In-Reply-To: <20230922162056.594933-3-miquel.raynal@bootlin.com>

On 22-09-23, 18:20, Miquel Raynal wrote:

> @@ -583,7 +690,36 @@ static int xdma_alloc_chan_resources(struct dma_chan *chan)
>  static enum dma_status xdma_tx_status(struct dma_chan *chan, dma_cookie_t cookie,
>  				      struct dma_tx_state *state)
>  {
> -	return dma_cookie_status(chan, cookie, state);
> +	struct xdma_chan *xdma_chan = to_xdma_chan(chan);
> +	struct xdma_desc *desc = NULL;
> +	struct virt_dma_desc *vd;
> +	enum dma_status ret;
> +	unsigned long flags;
> +	unsigned int period_idx;
> +	u32 residue = 0;
> +
> +	ret = dma_cookie_status(chan, cookie, state);
> +	if (ret == DMA_COMPLETE)
> +		return ret;
> +
> +	spin_lock_irqsave(&xdma_chan->vchan.lock, flags);
> +
> +	vd = vchan_find_desc(&xdma_chan->vchan, cookie);
> +	if (vd)
> +		desc = to_xdma_desc(vd);

vd is not used in below check, so should be done after below checks, why
do this for cyclic case?

Otherwise series lgtm, just fix the error reported by test bot

> +	if (!desc || !desc->cyclic) {
> +		spin_unlock_irqrestore(&xdma_chan->vchan.lock, flags);
> +		return ret;
> +	}
-- 
~Vinod

  parent reply	other threads:[~2023-09-28 10:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-22 16:20 [PATCH v2 0/2] dmaengine: xdma: Cyclic transfers support Miquel Raynal
2023-09-22 16:20 ` [PATCH v2 1/2] dmaengine: xilinx: xdma: Prepare the introduction of cyclic transfers Miquel Raynal
2023-09-22 16:20 ` [PATCH v2 2/2] dmaengine: xilinx: xdma: Support " Miquel Raynal
2023-09-22 17:43   ` kernel test robot
2023-09-28 10:54   ` Vinod Koul [this message]
2023-10-03  9:02     ` Miquel Raynal
2023-10-04  7:29       ` Vinod Koul
2023-10-04  7:46         ` Miquel Raynal

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=ZRVbZwQz13hL2QfY@matsya \
    --to=vkoul@kernel.org \
    --cc=brian.xu@amd.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizhi.hou@amd.com \
    --cc=michal.simek@amd.com \
    --cc=miquel.raynal@bootlin.com \
    --cc=raj.kumar.rampelli@amd.com \
    --cc=thomas.petazzoni@bootlin.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
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