mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Benoît Monin" <benoit.monin@bootlin.com>
To: Frank Li <Frank.li@oss.nxp.com>
Cc: Frank Li <Frank.Li@nxp.com>, Vinod Koul <vkoul@kernel.org>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Frank Li <Frank.Li@kernel.org>,
	imx@lists.linux.dev, dmaengine@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v9 2/2] dmaengine: fsl-edma: Support dynamic scatter/gather chaining
Date: Fri, 11 Sep 2026 14:33:34 +0200	[thread overview]
Message-ID: <oBv7yd-8ShCSaD2GFjIzIg@bootlin.com> (raw)
In-Reply-To: <aqMqaaDRKHzZObJE@lizhi-Precision-Tower-5810>

On Friday, 11 September 2026 at 00:08:41 CEST, Frank Li wrote:
> > +      /* Link the SG descriptors with the available identifiers */
> > +      list_for_each_entry_safe(vdesc, tmp, &fsl_chan->vchan.desc_submitted, node) {
> > +              if (++issued_count > FIELD_MAX(EDMA_TCD_CSR_LINKCH))
> > +                      break;
> > +              fsl_edma_link_sg(fsl_chan, to_fsl_edma_desc(vdesc));
> > +              list_move_tail(&vdesc->node, &fsl_chan->vchan.desc_issued);
> 
> If this happen, it will depend on DONE irq to queue left desc_issued to
> hardware tcd? So there are idle gap?
> 
> I think it is fine, less possible longer than 31. I just want to confirm
> if my understand is correct.
> 
Yes, only 31 descriptors get linked at most, to make sure that we never get
the same link_sg_id twice in the issued queue. So we always know which
descriptor to handle in the end of transfer interrupt.

If we have more descriptors, their last TCD keep the D_REQ flag, and they
are handled one by one as we are doing today with a "stop-and-start" of the
channel.

[...]
> > +#define FSL_EDMA_DRV_EDMA3    (FSL_EDMA_DRV_SPLIT_REG |               \
> > +                               FSL_EDMA_DRV_BUS_8BYTE |               \
> > +                               FSL_EDMA_DRV_DEV_TO_DEV |              \
> > +                               FSL_EDMA_DRV_ALIGN_64BYTE |            \
> > +                               FSL_EDMA_DRV_CLEAR_DONE_E_SG |         \
> > +                               FSL_EDMA_DRV_CLEAR_DONE_E_LINK |       \
> > +                               FSL_EDMA_DRV_CSR_LINKCH)
> >
> > -#define FSL_EDMA_DRV_EDMA3    (FSL_EDMA_DRV_SPLIT_REG |       \
> > -                               FSL_EDMA_DRV_BUS_8BYTE |       \
> > -                               FSL_EDMA_DRV_DEV_TO_DEV |      \
> > -                               FSL_EDMA_DRV_ALIGN_64BYTE |    \
> > -                               FSL_EDMA_DRV_CLEAR_DONE_E_SG | \
> > -                               FSL_EDMA_DRV_CLEAR_DONE_E_LINK)
> > -
> > -#define FSL_EDMA_DRV_EDMA4    (FSL_EDMA_DRV_SPLIT_REG |       \
> > -                               FSL_EDMA_DRV_BUS_8BYTE |       \
> > -                               FSL_EDMA_DRV_DEV_TO_DEV |      \
> > -                               FSL_EDMA_DRV_ALIGN_64BYTE |    \
> > -                               FSL_EDMA_DRV_CLEAR_DONE_E_LINK)
> > +#define FSL_EDMA_DRV_EDMA4    (FSL_EDMA_DRV_SPLIT_REG |               \
> > +                               FSL_EDMA_DRV_BUS_8BYTE |               \
> > +                               FSL_EDMA_DRV_DEV_TO_DEV |              \
> > +                               FSL_EDMA_DRV_ALIGN_64BYTE |            \
> > +                               FSL_EDMA_DRV_CLEAR_DONE_E_LINK |       \
> > +                               FSL_EDMA_DRV_CSR_LINKCH)
> 
> Can you avoid move \ in this patch to reduce difference.
> 
Ok, I will revert that change and resend.

Best regards,
-- 
Benoît



      reply	other threads:[~2026-09-11 12:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-09 15:19 [PATCH v9 0/2] dmaengine: fsl-edma: Scatter/gather improvements Benoît Monin
2026-09-09 15:19 ` [PATCH v9 2/2] dmaengine: fsl-edma: Support dynamic scatter/gather chaining Benoît Monin
2026-09-10 22:08   ` Frank Li
2026-09-11 12:33     ` Benoît Monin [this message]

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=oBv7yd-8ShCSaD2GFjIzIg@bootlin.com \
    --to=benoit.monin@bootlin.com \
    --cc=Frank.Li@kernel.org \
    --cc=Frank.Li@nxp.com \
    --cc=Frank.li@oss.nxp.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=imx@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thomas.petazzoni@bootlin.com \
    --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

all inboxes | Powered by JetHome®