[PATCH 0/3] dmaengine: ti: k3-udma: Fix/improve the completion helper

Miquel Raynal posted 3 patches 2 months ago
drivers/dma/ti/k3-udma.c | 85 ++++++++++++++++++++----------------------------
1 file changed, 36 insertions(+), 49 deletions(-)
[PATCH 0/3] dmaengine: ti: k3-udma: Fix/improve the completion helper
Posted by Miquel Raynal 2 months ago
While working on a BeaglePlay with the UART controller and making it use
DMA, I figured the DMA controller completion helper was clearly
misbehaving.

On one side, with slow devices like a UART controller, the helper uses
an unusual polling delay of 1s.

On the other side, the helper can also perform 0us sleeps which means
the driver does not sleep at all in some situations and keeps the CPU
busy waiting.

Finally, while I was digging into these issues, it felt like the helper
was a bit too complex and could be simplified, which is what I did in
patch 3. I initially worked on v6.7.x which did not had the spinlocks, I
hope I didn't got them wrong.

I also tested this with v6.17-rc7.

Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
Miquel Raynal (3):
      dmaengine: ti: k3-udma: Reduce completion polling delay
      dmaengine: ti: k3-udma: Ensure a minimum polling delay
      dmaengine: ti: k3-udma: Simplify the completion worker

 drivers/dma/ti/k3-udma.c | 85 ++++++++++++++++++++----------------------------
 1 file changed, 36 insertions(+), 49 deletions(-)
---
base-commit: b59220b9fa2c3da4295d71913146cd64b869fcf9
change-id: 20250731-ti-dma-timeout-1c64868b5baf

Best regards,
-- 
Miquel Raynal <miquel.raynal@bootlin.com>