mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Biju Das <biju.das.jz@bp.renesas.com>
To: Claudiu.Beznea <claudiu.beznea@tuxon.dev>,
	"vkoul@kernel.org" <vkoul@kernel.org>,
	"Frank.Li@kernel.org" <Frank.Li@kernel.org>,
	"lgirdwood@gmail.com" <lgirdwood@gmail.com>,
	"broonie@kernel.org" <broonie@kernel.org>,
	"perex@perex.cz" <perex@perex.cz>,
	"tiwai@suse.com" <tiwai@suse.com>,
	Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>,
	"p.zabel@pengutronix.de" <p.zabel@pengutronix.de>,
	"geert+renesas@glider.be" <geert+renesas@glider.be>,
	Fabrizio Castro <fabrizio.castro.jz@renesas.com>
Cc: "dmaengine@vger.kernel.org" <dmaengine@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-sound@vger.kernel.org" <linux-sound@vger.kernel.org>,
	"linux-renesas-soc@vger.kernel.org"
	<linux-renesas-soc@vger.kernel.org>,
	Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Subject: RE: [PATCH v3 11/15] dmaengine: sh: rz-dmac: Add cyclic DMA support
Date: Tue, 7 Apr 2026 15:16:14 +0000	[thread overview]
Message-ID: <TYCPR01MB113324C600BE0ACFD52001A6E865AA@TYCPR01MB11332.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <77514d1b-e418-47db-9b47-8f7d8a4cedc5@tuxon.dev>

Hi Claudiu Beznea,

> -----Original Message-----
> From: Claudiu Beznea <claudiu.beznea@tuxon.dev>
> Sent: 07 April 2026 16:13
> Subject: Re: [PATCH v3 11/15] dmaengine: sh: rz-dmac: Add cyclic DMA support
> 
> Hi, Biju,
> 
> On 4/7/26 17:36, Biju Das wrote:
> >
> > Hi Claudiu,
> >
> > Thanks for the patch.
> >
> >> -----Original Message-----
> >> From: Claudiu <claudiu.beznea@tuxon.dev>
> >> Sent: 07 April 2026 14:35
> >> Subject: [PATCH v3 11/15] dmaengine: sh: rz-dmac: Add cyclic DMA
> >> support
> >>
> >> From: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
> >>
> >> Add cyclic DMA support to the RZ DMAC driver. A per-channel status
> >> bit is introduced to mark cyclic channels and is set during the DMA
> >> prepare callback. The IRQ handler checks this status bit and calls
> >> vchan_cyclic_callback() accordingly.
> >>
> >> Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
> >> ---
> >>
> >> Changes in v3:
> >> - updated rz_dmac_lmdesc_recycle() to restore the lmdesc->nxla
> >> - in rz_dmac_prepare_descs_for_cyclic() update directly the
> >>    desc->start_lmdesc with the descriptor pointer insted of the
> >>    descriptor address
> >> - used rz_dmac_lmdesc_addr() to compute the descritor address
> >> - set channel->status = 0 in rz_dmac_free_chan_resources()
> >> - in rz_dmac_prep_dma_cyclic() check for invalid periods or buffer len
> >>    and limit the critical area protected by spinlock
> >> - set channel->status = 0 in rz_dmac_terminate_all()
> >> - updated rz_dmac_calculate_residue_bytes_in_vd() to use
> >>    rz_dmac_lmdesc_addr()
> >> - dropped goto in rz_dmac_irq_handler_thread() as it is not needed
> >>    anymore; dropped also the local variable desc
> >>
> >> Changes in v2:
> >> - none
> >>
> >>   drivers/dma/sh/rz-dmac.c | 144 +++++++++++++++++++++++++++++++++++++--
> >>   1 file changed, 138 insertions(+), 6 deletions(-)
> >>
> 
> [ ... ]
> 
> >> @@ -500,6 +562,8 @@ static void rz_dmac_free_chan_resources(struct dma_chan *chan)
> >>   		channel->mid_rid = -EINVAL;
> >>   	}
> >>
> >> +	channel->status = 0;
> >> +
> >>   	spin_unlock_irqrestore(&channel->vc.lock, flags);
> >
> > Maybe create a patch to convert all the spin_{lock,unlock} with
> > guard() in this driver.
> 
> This series already has to many patches and I want to keep only what is necessary for the cyclic
> support. My plan is to do the guard conversion after cyclic support gets merged.

The driver has a mix of guard and spin_lock_unlock variants with this series.
That is the reason for suggestion.

Yes, it can be done later.

Cheers,
Biju

  reply	other threads:[~2026-04-07 15:16 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-07 13:34 [PATCH v3 00/15] Renesas: dmaengine and ASoC fixes Claudiu
2026-04-07 13:34 ` [PATCH v3 01/15] dmaengine: sh: rz-dmac: Use list_first_entry_or_null() Claudiu
2026-04-07 13:34 ` [PATCH v3 02/15] dmaengine: sh: rz-dmac: Use rz_dmac_disable_hw() Claudiu
2026-04-07 13:34 ` [PATCH v3 03/15] dmaengine: sh: rz-dmac: Do not disable the channel on error Claudiu
2026-04-07 13:34 ` [PATCH v3 04/15] dmaengine: sh: rz-dmac: Add helper to compute the lmdesc address Claudiu
2026-04-07 13:34 ` [PATCH v3 05/15] dmaengine: sh: rz-dmac: Save the start LM descriptor Claudiu
2026-04-07 13:34 ` [PATCH v3 06/15] dmaengine: sh: rz-dmac: Add helper to check if the channel is enabled Claudiu
2026-04-07 13:34 ` [PATCH v3 07/15] dmaengine: sh: rz-dmac: Add helper to check if the channel is paused Claudiu
2026-04-07 13:35 ` [PATCH v3 08/15] dmaengine: sh: rz-dmac: Use virt-dma APIs for channel descriptor processing Claudiu
2026-04-07 13:35 ` [PATCH v3 09/15] dmaengine: sh: rz-dmac: Refactor pause/resume code Claudiu
2026-04-07 13:35 ` [PATCH v3 10/15] dmaengine: sh: rz-dmac: Drop the update of channel->chctrl with CHCTRL_SETEN Claudiu
2026-04-07 13:35 ` [PATCH v3 11/15] dmaengine: sh: rz-dmac: Add cyclic DMA support Claudiu
2026-04-07 14:36   ` Biju Das
2026-04-07 15:12     ` Claudiu Beznea
2026-04-07 15:16       ` Biju Das [this message]
2026-04-07 13:35 ` [PATCH v3 12/15] dmaengine: sh: rz-dmac: Add suspend to RAM support Claudiu
2026-04-07 13:35 ` [PATCH v3 13/15] ASoC: renesas: rz-ssi: Add pause support Claudiu
2026-04-08 17:33   ` Mark Brown
2026-04-07 13:35 ` [PATCH v3 14/15] ASoC: renesas: rz-ssi: Use generic PCM dmaengine APIs Claudiu
2026-04-08 17:34   ` Mark Brown
2026-04-07 13:35 ` [PATCH v3 15/15] dmaengine: sh: rz-dmac: Set the Link End (LE) bit on the last descriptor Claudiu

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=TYCPR01MB113324C600BE0ACFD52001A6E865AA@TYCPR01MB11332.jpnprd01.prod.outlook.com \
    --to=biju.das.jz@bp.renesas.com \
    --cc=Frank.Li@kernel.org \
    --cc=broonie@kernel.org \
    --cc=claudiu.beznea.uj@bp.renesas.com \
    --cc=claudiu.beznea@tuxon.dev \
    --cc=dmaengine@vger.kernel.org \
    --cc=fabrizio.castro.jz@renesas.com \
    --cc=geert+renesas@glider.be \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=perex@perex.cz \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=tiwai@suse.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®