These patches were generated from: https://github.com/raspberrypi/linux/commits/rpi-6.12.y With the following command: git format-patch -N v6.12.27..HEAD (HEAD -> 8d3206ee456a5ecdf9ddbfd8e5e231e4f0cd716e) Exceptions: - (def)configs patches - github workflows patches - applied & reverted patches - readme patches - wireless patches Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
29 lines
1.1 KiB
Diff
29 lines
1.1 KiB
Diff
From 280c37a1cd9928d8370bba3e92b4220bc001c116 Mon Sep 17 00:00:00 2001
|
|
From: Phil Elwell <phil@raspberrypi.com>
|
|
Date: Wed, 13 Nov 2024 10:37:22 +0000
|
|
Subject: [PATCH] dmaengine: dw-axi-dmac: Only start idle channels
|
|
|
|
Attempting to start a non-idle channel causes an error message to be
|
|
logged, and is inefficient. Test for emptiness of the desc_issued list
|
|
before doing so.
|
|
|
|
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
|
---
|
|
drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c | 4 +++-
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
--- a/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
|
|
+++ b/drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c
|
|
@@ -583,9 +583,11 @@ static void dma_chan_issue_pending(struc
|
|
{
|
|
struct axi_dma_chan *chan = dchan_to_axi_dma_chan(dchan);
|
|
unsigned long flags;
|
|
+ bool was_empty;
|
|
|
|
spin_lock_irqsave(&chan->vc.lock, flags);
|
|
- if (vchan_issue_pending(&chan->vc))
|
|
+ was_empty = list_empty(&chan->vc.desc_issued);
|
|
+ if (vchan_issue_pending(&chan->vc) && was_empty)
|
|
axi_chan_start_first_queued(chan);
|
|
spin_unlock_irqrestore(&chan->vc.lock, flags);
|
|
}
|