DMA Engine development
 help / color / mirror / Atom feed
* [PATCH 0/3] dmaengine: xilinx_dma: Fixes and optimizations for channel management
@ 2025-09-17 13:36 Suraj Gupta
  2025-09-17 13:36 ` [PATCH 1/3] dmaengine: xilinx_dma: Fix channel idle state management in interrupt handler Suraj Gupta
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Suraj Gupta @ 2025-09-17 13:36 UTC (permalink / raw)
  To: vkoul, radhey.shyam.pandey, michal.simek
  Cc: dmaengine, linux-arm-kernel, linux-kernel

This patch series addresses issues and optimizations in the Xilinx
AXI DMA driver:
1. Fix channel idle state management in the interrupt handler.
2. Enable transfer chaining by removing unnecessary idle restrictions.
3. Optimize control register writes and channel start logic.

Note: The patches in this series were part of following IRQ coalescing
series which is under discussion:
https://lore.kernel.org/all/20250710101229.804183-1-suraj.gupta2@amd.com/

Suraj Gupta (3):
  dmaengine: xilinx_dma: Fix channel idle state management in interrupt
    handler
  dmaengine: xilinx_dma: Enable transfer chaining by removing idle
    restriction
  dmaengine: xilinx_dma: Optimize control register write and channel
    start logic in xilinx_dma_start_transfer

 drivers/dma/xilinx/xilinx_dma.c | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH 1/3] dmaengine: xilinx_dma: Fix channel idle state management in interrupt handler
  2025-09-17 13:36 [PATCH 0/3] dmaengine: xilinx_dma: Fixes and optimizations for channel management Suraj Gupta
@ 2025-09-17 13:36 ` Suraj Gupta
  2025-09-18  7:32   ` Folker Schwesinger
                     ` (2 more replies)
  2025-09-17 13:36 ` [PATCH 2/3] dmaengine: xilinx_dma: Enable transfer chaining by removing idle restriction Suraj Gupta
  2025-09-17 13:36 ` [PATCH 3/3] dmaengine: xilinx_dma: Optimize control register write and channel start logic in xilinx_dma_start_transfer Suraj Gupta
  2 siblings, 3 replies; 10+ messages in thread
From: Suraj Gupta @ 2025-09-17 13:36 UTC (permalink / raw)
  To: vkoul, radhey.shyam.pandey, michal.simek
  Cc: dmaengine, linux-arm-kernel, linux-kernel

Only mark the channel as idle and start new transfers when the active list
is actually empty, ensuring proper channel state management and avoiding
spurious transfer attempts.

Signed-off-by: Suraj Gupta <suraj.gupta2@amd.com>
Fixes: c0bba3a99f07 ("dmaengine: vdma: Add Support for Xilinx AXI Direct Memory Access Engine")
---
 drivers/dma/xilinx/xilinx_dma.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c
index a34d8f0ceed8..9f416eae33d0 100644
--- a/drivers/dma/xilinx/xilinx_dma.c
+++ b/drivers/dma/xilinx/xilinx_dma.c
@@ -1914,8 +1914,10 @@ static irqreturn_t xilinx_dma_irq_handler(int irq, void *data)
 		      XILINX_DMA_DMASR_DLY_CNT_IRQ)) {
 		spin_lock(&chan->lock);
 		xilinx_dma_complete_descriptor(chan);
-		chan->idle = true;
-		chan->start_transfer(chan);
+		if (list_empty(&chan->active_list)) {
+			chan->idle = true;
+			chan->start_transfer(chan);
+		}
 		spin_unlock(&chan->lock);
 	}
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 2/3] dmaengine: xilinx_dma: Enable transfer chaining by removing idle restriction
  2025-09-17 13:36 [PATCH 0/3] dmaengine: xilinx_dma: Fixes and optimizations for channel management Suraj Gupta
  2025-09-17 13:36 ` [PATCH 1/3] dmaengine: xilinx_dma: Fix channel idle state management in interrupt handler Suraj Gupta
@ 2025-09-17 13:36 ` Suraj Gupta
  2025-09-18  7:33   ` Folker Schwesinger
  2025-09-29  5:44   ` Pandey, Radhey Shyam
  2025-09-17 13:36 ` [PATCH 3/3] dmaengine: xilinx_dma: Optimize control register write and channel start logic in xilinx_dma_start_transfer Suraj Gupta
  2 siblings, 2 replies; 10+ messages in thread
From: Suraj Gupta @ 2025-09-17 13:36 UTC (permalink / raw)
  To: vkoul, radhey.shyam.pandey, michal.simek
  Cc: dmaengine, linux-arm-kernel, linux-kernel

Remove the restrictive idle check in xilinx_dma_start_transfer() that
prevented new transfers from being queued when the channel was busy.
Additionally, only update the CURDESC register when the active list
is empty to avoid interfering with transfers already in progress.
When the active list contains transfers, the hardware tail pointer
extension mechanism handles chaining automatically.

Signed-off-by: Suraj Gupta <suraj.gupta2@amd.com>
---
 drivers/dma/xilinx/xilinx_dma.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c
index 9f416eae33d0..7211c394cdca 100644
--- a/drivers/dma/xilinx/xilinx_dma.c
+++ b/drivers/dma/xilinx/xilinx_dma.c
@@ -1548,9 +1548,6 @@ static void xilinx_dma_start_transfer(struct xilinx_dma_chan *chan)
 	if (list_empty(&chan->pending_list))
 		return;
 
-	if (!chan->idle)
-		return;
-
 	head_desc = list_first_entry(&chan->pending_list,
 				     struct xilinx_dma_tx_descriptor, node);
 	tail_desc = list_last_entry(&chan->pending_list,
@@ -1567,7 +1564,7 @@ static void xilinx_dma_start_transfer(struct xilinx_dma_chan *chan)
 		dma_ctrl_write(chan, XILINX_DMA_REG_DMACR, reg);
 	}
 
-	if (chan->has_sg)
+	if (chan->has_sg && list_empty(&chan->active_list))
 		xilinx_write(chan, XILINX_DMA_REG_CURDESC,
 			     head_desc->async_tx.phys);
 	reg  &= ~XILINX_DMA_CR_DELAY_MAX;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH 3/3] dmaengine: xilinx_dma: Optimize control register write and channel start logic in xilinx_dma_start_transfer
  2025-09-17 13:36 [PATCH 0/3] dmaengine: xilinx_dma: Fixes and optimizations for channel management Suraj Gupta
  2025-09-17 13:36 ` [PATCH 1/3] dmaengine: xilinx_dma: Fix channel idle state management in interrupt handler Suraj Gupta
  2025-09-17 13:36 ` [PATCH 2/3] dmaengine: xilinx_dma: Enable transfer chaining by removing idle restriction Suraj Gupta
@ 2025-09-17 13:36 ` Suraj Gupta
  2025-09-18  7:34   ` Folker Schwesinger
  2 siblings, 1 reply; 10+ messages in thread
From: Suraj Gupta @ 2025-09-17 13:36 UTC (permalink / raw)
  To: vkoul, radhey.shyam.pandey, michal.simek
  Cc: dmaengine, linux-arm-kernel, linux-kernel

Optimize AXI DMA control register programming by consolidating
coalesce count and delay configuration into a single register write.
Previously, the coalesce count was written separately from the delay
configuration, resulting in two register writes. Combine these into
one write operation to reduce bus overhead.
Additionally, avoid redundant channel starts by only calling
xilinx_dma_start() when the channel is actually idle.

Signed-off-by: Suraj Gupta <suraj.gupta2@amd.com>
---
 drivers/dma/xilinx/xilinx_dma.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c
index 7211c394cdca..6e9bf4732ded 100644
--- a/drivers/dma/xilinx/xilinx_dma.c
+++ b/drivers/dma/xilinx/xilinx_dma.c
@@ -1561,7 +1561,6 @@ static void xilinx_dma_start_transfer(struct xilinx_dma_chan *chan)
 		reg &= ~XILINX_DMA_CR_COALESCE_MAX;
 		reg |= chan->desc_pendingcount <<
 				  XILINX_DMA_CR_COALESCE_SHIFT;
-		dma_ctrl_write(chan, XILINX_DMA_REG_DMACR, reg);
 	}
 
 	if (chan->has_sg && list_empty(&chan->active_list))
@@ -1571,7 +1570,8 @@ static void xilinx_dma_start_transfer(struct xilinx_dma_chan *chan)
 	reg  |= chan->irq_delay << XILINX_DMA_CR_DELAY_SHIFT;
 	dma_ctrl_write(chan, XILINX_DMA_REG_DMACR, reg);
 
-	xilinx_dma_start(chan);
+	if (chan->idle)
+		xilinx_dma_start(chan);
 
 	if (chan->err)
 		return;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/3] dmaengine: xilinx_dma: Fix channel idle state management in interrupt handler
  2025-09-17 13:36 ` [PATCH 1/3] dmaengine: xilinx_dma: Fix channel idle state management in interrupt handler Suraj Gupta
@ 2025-09-18  7:32   ` Folker Schwesinger
  2025-09-18  7:36   ` Folker Schwesinger
  2025-09-29  5:36   ` Pandey, Radhey Shyam
  2 siblings, 0 replies; 10+ messages in thread
From: Folker Schwesinger @ 2025-09-18  7:32 UTC (permalink / raw)
  To: Suraj Gupta, vkoul, radhey.shyam.pandey, michal.simek
  Cc: dmaengine, linux-arm-kernel, linux-kernel

On Wed Sep 17, 2025 at 3:36 PM CEST, Suraj Gupta wrote:
> Only mark the channel as idle and start new transfers when the active list
> is actually empty, ensuring proper channel state management and avoiding
> spurious transfer attempts.
>
> Signed-off-by: Suraj Gupta <suraj.gupta2@amd.com>
> Fixes: c0bba3a99f07 ("dmaengine: vdma: Add Support for Xilinx AXI Direct Memory Access Engine")

Tested-by: Folker Schwesinger <dev@folker-schwesinger.de>

> ---
>  drivers/dma/xilinx/xilinx_dma.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c
> index a34d8f0ceed8..9f416eae33d0 100644
> --- a/drivers/dma/xilinx/xilinx_dma.c
> +++ b/drivers/dma/xilinx/xilinx_dma.c
> @@ -1914,8 +1914,10 @@ static irqreturn_t xilinx_dma_irq_handler(int irq, void *data)
>  		      XILINX_DMA_DMASR_DLY_CNT_IRQ)) {
>  		spin_lock(&chan->lock);
>  		xilinx_dma_complete_descriptor(chan);
> -		chan->idle = true;
> -		chan->start_transfer(chan);
> +		if (list_empty(&chan->active_list)) {
> +			chan->idle = true;
> +			chan->start_transfer(chan);
> +		}
>  		spin_unlock(&chan->lock);
>  	}
>  


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 2/3] dmaengine: xilinx_dma: Enable transfer chaining by removing idle restriction
  2025-09-17 13:36 ` [PATCH 2/3] dmaengine: xilinx_dma: Enable transfer chaining by removing idle restriction Suraj Gupta
@ 2025-09-18  7:33   ` Folker Schwesinger
  2025-09-29  5:44   ` Pandey, Radhey Shyam
  1 sibling, 0 replies; 10+ messages in thread
From: Folker Schwesinger @ 2025-09-18  7:33 UTC (permalink / raw)
  To: Suraj Gupta, vkoul, radhey.shyam.pandey, michal.simek
  Cc: dmaengine, linux-arm-kernel, linux-kernel

On Wed Sep 17, 2025 at 3:36 PM CEST, Suraj Gupta wrote:
> Remove the restrictive idle check in xilinx_dma_start_transfer() that
> prevented new transfers from being queued when the channel was busy.
> Additionally, only update the CURDESC register when the active list
> is empty to avoid interfering with transfers already in progress.
> When the active list contains transfers, the hardware tail pointer
> extension mechanism handles chaining automatically.
>
> Signed-off-by: Suraj Gupta <suraj.gupta2@amd.com>

Tested-by: Folker Schwesinger <dev@folker-schwesinger.de>

> ---
>  drivers/dma/xilinx/xilinx_dma.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c
> index 9f416eae33d0..7211c394cdca 100644
> --- a/drivers/dma/xilinx/xilinx_dma.c
> +++ b/drivers/dma/xilinx/xilinx_dma.c
> @@ -1548,9 +1548,6 @@ static void xilinx_dma_start_transfer(struct xilinx_dma_chan *chan)
>  	if (list_empty(&chan->pending_list))
>  		return;
>  
> -	if (!chan->idle)
> -		return;
> -
>  	head_desc = list_first_entry(&chan->pending_list,
>  				     struct xilinx_dma_tx_descriptor, node);
>  	tail_desc = list_last_entry(&chan->pending_list,
> @@ -1567,7 +1564,7 @@ static void xilinx_dma_start_transfer(struct xilinx_dma_chan *chan)
>  		dma_ctrl_write(chan, XILINX_DMA_REG_DMACR, reg);
>  	}
>  
> -	if (chan->has_sg)
> +	if (chan->has_sg && list_empty(&chan->active_list))
>  		xilinx_write(chan, XILINX_DMA_REG_CURDESC,
>  			     head_desc->async_tx.phys);
>  	reg  &= ~XILINX_DMA_CR_DELAY_MAX;


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 3/3] dmaengine: xilinx_dma: Optimize control register write and channel start logic in xilinx_dma_start_transfer
  2025-09-17 13:36 ` [PATCH 3/3] dmaengine: xilinx_dma: Optimize control register write and channel start logic in xilinx_dma_start_transfer Suraj Gupta
@ 2025-09-18  7:34   ` Folker Schwesinger
  0 siblings, 0 replies; 10+ messages in thread
From: Folker Schwesinger @ 2025-09-18  7:34 UTC (permalink / raw)
  To: Suraj Gupta, vkoul, radhey.shyam.pandey, michal.simek
  Cc: dmaengine, linux-arm-kernel, linux-kernel

On Wed Sep 17, 2025 at 3:36 PM CEST, Suraj Gupta wrote:
> Optimize AXI DMA control register programming by consolidating
> coalesce count and delay configuration into a single register write.
> Previously, the coalesce count was written separately from the delay
> configuration, resulting in two register writes. Combine these into
> one write operation to reduce bus overhead.
> Additionally, avoid redundant channel starts by only calling
> xilinx_dma_start() when the channel is actually idle.
>
> Signed-off-by: Suraj Gupta <suraj.gupta2@amd.com>

Tested-by: Folker Schwesinger <dev@folker-schwesinger.de>

> ---
>  drivers/dma/xilinx/xilinx_dma.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c
> index 7211c394cdca..6e9bf4732ded 100644
> --- a/drivers/dma/xilinx/xilinx_dma.c
> +++ b/drivers/dma/xilinx/xilinx_dma.c
> @@ -1561,7 +1561,6 @@ static void xilinx_dma_start_transfer(struct xilinx_dma_chan *chan)
>  		reg &= ~XILINX_DMA_CR_COALESCE_MAX;
>  		reg |= chan->desc_pendingcount <<
>  				  XILINX_DMA_CR_COALESCE_SHIFT;
> -		dma_ctrl_write(chan, XILINX_DMA_REG_DMACR, reg);
>  	}
>  
>  	if (chan->has_sg && list_empty(&chan->active_list))
> @@ -1571,7 +1570,8 @@ static void xilinx_dma_start_transfer(struct xilinx_dma_chan *chan)
>  	reg  |= chan->irq_delay << XILINX_DMA_CR_DELAY_SHIFT;
>  	dma_ctrl_write(chan, XILINX_DMA_REG_DMACR, reg);
>  
> -	xilinx_dma_start(chan);
> +	if (chan->idle)
> +		xilinx_dma_start(chan);
>  
>  	if (chan->err)
>  		return;


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH 1/3] dmaengine: xilinx_dma: Fix channel idle state management in interrupt handler
  2025-09-17 13:36 ` [PATCH 1/3] dmaengine: xilinx_dma: Fix channel idle state management in interrupt handler Suraj Gupta
  2025-09-18  7:32   ` Folker Schwesinger
@ 2025-09-18  7:36   ` Folker Schwesinger
  2025-09-29  5:36   ` Pandey, Radhey Shyam
  2 siblings, 0 replies; 10+ messages in thread
From: Folker Schwesinger @ 2025-09-18  7:36 UTC (permalink / raw)
  To: Suraj Gupta, vkoul, radhey.shyam.pandey, michal.simek
  Cc: dmaengine, linux-arm-kernel, linux-kernel

On Wed Sep 17, 2025 at 3:36 PM CEST, Suraj Gupta wrote:
> Only mark the channel as idle and start new transfers when the active list
> is actually empty, ensuring proper channel state management and avoiding
> spurious transfer attempts.
>
> Signed-off-by: Suraj Gupta <suraj.gupta2@amd.com>
> Fixes: c0bba3a99f07 ("dmaengine: vdma: Add Support for Xilinx AXI Direct Memory Access Engine")

Tested-by: Folker Schwesinger <dev@folker-schwesinger.de>

> ---
>  drivers/dma/xilinx/xilinx_dma.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c
> index a34d8f0ceed8..9f416eae33d0 100644
> --- a/drivers/dma/xilinx/xilinx_dma.c
> +++ b/drivers/dma/xilinx/xilinx_dma.c
> @@ -1914,8 +1914,10 @@ static irqreturn_t xilinx_dma_irq_handler(int irq, void *data)
>  		      XILINX_DMA_DMASR_DLY_CNT_IRQ)) {
>  		spin_lock(&chan->lock);
>  		xilinx_dma_complete_descriptor(chan);
> -		chan->idle = true;
> -		chan->start_transfer(chan);
> +		if (list_empty(&chan->active_list)) {
> +			chan->idle = true;
> +			chan->start_transfer(chan);
> +		}
>  		spin_unlock(&chan->lock);
>  	}
>  


^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [PATCH 1/3] dmaengine: xilinx_dma: Fix channel idle state management in interrupt handler
  2025-09-17 13:36 ` [PATCH 1/3] dmaengine: xilinx_dma: Fix channel idle state management in interrupt handler Suraj Gupta
  2025-09-18  7:32   ` Folker Schwesinger
  2025-09-18  7:36   ` Folker Schwesinger
@ 2025-09-29  5:36   ` Pandey, Radhey Shyam
  2 siblings, 0 replies; 10+ messages in thread
From: Pandey, Radhey Shyam @ 2025-09-29  5:36 UTC (permalink / raw)
  To: Gupta, Suraj, vkoul@kernel.org, Simek, Michal
  Cc: dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org

[AMD Official Use Only - AMD Internal Distribution Only]

> -----Original Message-----
> From: Suraj Gupta <suraj.gupta2@amd.com>
> Sent: Wednesday, September 17, 2025 7:06 PM
> To: vkoul@kernel.org; Pandey, Radhey Shyam <radhey.shyam.pandey@amd.com>;
> Simek, Michal <michal.simek@amd.com>
> Cc: dmaengine@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> kernel@vger.kernel.org
> Subject: [PATCH 1/3] dmaengine: xilinx_dma: Fix channel idle state management in
> interrupt handler
>
> Only mark the channel as idle and start new transfers when the active list is actually
> empty, ensuring proper channel state management and avoiding spurious transfer
> attempts.

Nit - also explain the spurious transfer scenario so that fixes tag is justified.
>
> Signed-off-by: Suraj Gupta <suraj.gupta2@amd.com>
> Fixes: c0bba3a99f07 ("dmaengine: vdma: Add Support for Xilinx AXI Direct Memory
> Access Engine")
> ---
>  drivers/dma/xilinx/xilinx_dma.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c index
> a34d8f0ceed8..9f416eae33d0 100644
> --- a/drivers/dma/xilinx/xilinx_dma.c
> +++ b/drivers/dma/xilinx/xilinx_dma.c
> @@ -1914,8 +1914,10 @@ static irqreturn_t xilinx_dma_irq_handler(int irq, void
> *data)
>                     XILINX_DMA_DMASR_DLY_CNT_IRQ)) {
>               spin_lock(&chan->lock);
>               xilinx_dma_complete_descriptor(chan);
> -             chan->idle = true;
> -             chan->start_transfer(chan);
> +             if (list_empty(&chan->active_list)) {
> +                     chan->idle = true;
> +                     chan->start_transfer(chan);
> +             }
>               spin_unlock(&chan->lock);
>       }
>
> --
> 2.25.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* RE: [PATCH 2/3] dmaengine: xilinx_dma: Enable transfer chaining by removing idle restriction
  2025-09-17 13:36 ` [PATCH 2/3] dmaengine: xilinx_dma: Enable transfer chaining by removing idle restriction Suraj Gupta
  2025-09-18  7:33   ` Folker Schwesinger
@ 2025-09-29  5:44   ` Pandey, Radhey Shyam
  1 sibling, 0 replies; 10+ messages in thread
From: Pandey, Radhey Shyam @ 2025-09-29  5:44 UTC (permalink / raw)
  To: Gupta, Suraj, vkoul@kernel.org, Simek, Michal
  Cc: dmaengine@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org

[AMD Official Use Only - AMD Internal Distribution Only]

> -----Original Message-----
> From: Suraj Gupta <suraj.gupta2@amd.com>
> Sent: Wednesday, September 17, 2025 7:06 PM
> To: vkoul@kernel.org; Pandey, Radhey Shyam <radhey.shyam.pandey@amd.com>;
> Simek, Michal <michal.simek@amd.com>
> Cc: dmaengine@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> kernel@vger.kernel.org
> Subject: [PATCH 2/3] dmaengine: xilinx_dma: Enable transfer chaining by removing
> idle restriction
>
> Remove the restrictive idle check in xilinx_dma_start_transfer() that prevented new
> transfers from being queued when the channel was busy.
> Additionally, only update the CURDESC register when the active list is empty to
> avoid interfering with transfers already in progress.
> When the active list contains transfers, the hardware tail pointer extension
> mechanism handles chaining automatically.

As we already have changes ready for MCDMA - please merge it in v2.
Both axidma /mcdma will support axistream connected.

>
> Signed-off-by: Suraj Gupta <suraj.gupta2@amd.com>
> ---
>  drivers/dma/xilinx/xilinx_dma.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/dma/xilinx/xilinx_dma.c b/drivers/dma/xilinx/xilinx_dma.c index
> 9f416eae33d0..7211c394cdca 100644
> --- a/drivers/dma/xilinx/xilinx_dma.c
> +++ b/drivers/dma/xilinx/xilinx_dma.c
> @@ -1548,9 +1548,6 @@ static void xilinx_dma_start_transfer(struct
> xilinx_dma_chan *chan)
>       if (list_empty(&chan->pending_list))
>               return;
>
> -     if (!chan->idle)
> -             return;
> -
>       head_desc = list_first_entry(&chan->pending_list,
>                                    struct xilinx_dma_tx_descriptor, node);
>       tail_desc = list_last_entry(&chan->pending_list,
> @@ -1567,7 +1564,7 @@ static void xilinx_dma_start_transfer(struct
> xilinx_dma_chan *chan)
>               dma_ctrl_write(chan, XILINX_DMA_REG_DMACR, reg);
>       }
>
> -     if (chan->has_sg)
> +     if (chan->has_sg && list_empty(&chan->active_list))
>               xilinx_write(chan, XILINX_DMA_REG_CURDESC,
>                            head_desc->async_tx.phys);
>       reg  &= ~XILINX_DMA_CR_DELAY_MAX;
> --
> 2.25.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2025-09-29  5:44 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-17 13:36 [PATCH 0/3] dmaengine: xilinx_dma: Fixes and optimizations for channel management Suraj Gupta
2025-09-17 13:36 ` [PATCH 1/3] dmaengine: xilinx_dma: Fix channel idle state management in interrupt handler Suraj Gupta
2025-09-18  7:32   ` Folker Schwesinger
2025-09-18  7:36   ` Folker Schwesinger
2025-09-29  5:36   ` Pandey, Radhey Shyam
2025-09-17 13:36 ` [PATCH 2/3] dmaengine: xilinx_dma: Enable transfer chaining by removing idle restriction Suraj Gupta
2025-09-18  7:33   ` Folker Schwesinger
2025-09-29  5:44   ` Pandey, Radhey Shyam
2025-09-17 13:36 ` [PATCH 3/3] dmaengine: xilinx_dma: Optimize control register write and channel start logic in xilinx_dma_start_transfer Suraj Gupta
2025-09-18  7:34   ` Folker Schwesinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox