Repository navigation
dmaengine: dw-axi-dmac: Add channel abort support - #7654
Conversation
Disabling a channel will stall and timeout if it is currently transferring to or from a slow peripheral with handshaking (which they all have). When that happens, use the channels "abort" feature to unblock the channel. See: raspberrypi#7642 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
From claude - is resending an issue?
|
|
Updated to ignore non-fatal signals if some data has already been transferred. |
|
There is a change in behaviour that may or may not be intended:
|
In the event of a signal being received, the transfer functions should return -ERESTARTSYS, having updated the ioctl args in place to prevent any duplication, so that the ioctl will be automatically retried once the signal has been dealt with. Also remove a few unnecessary error messages for non-error conditions. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
I'm enjoying this game of Claude vs Claude (and Phil vs Claude), but I think it should now cope with the case that the PIOLib client has installed a SIGINT handler (as long as it specifies SA_RESTART). |
|
Updated with a third patch to clear out stale RX data during the close procedure. All three commits are FYI, @hverkuil. |
|
Feel free to merge if you've had enough of claude, but he has more grumbles:
|
The DMAC's hardware handshake requires a peripheral's DMA request to stay asserted until the DMAC acknowledges a burst. If an SM's RX FIFO reaches its DMA threshold with no transfer queued - for example when a program exits - the request is held, and survives the FIFO being cleared or drained. The next user of that SM then gets a phantom burst: the first 4 or 8 words it receives are copies of a stale FIFO entry. When an SM is released, and after it has been disabled, retire any held request and leftover data with a throwaway RX transfer of a FIFO's worth plus one burst, then stop the channel. Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
Answering the points above as if they were numbered:
|
|
Feel free to merge. There was one final comment that isn't caused by this PR, but I'll mention in case you care:
|
|
Fair - see #7664. |
kernel: ASoC: iqaudio-codec: Add mic-only start-up delay See: raspberrypi/linux#7535 kernel: configs: Enable CONFIG_DRM_PANIC See: raspberrypi/linux#7637 kernel: drm/vc4: fix two phase errors in the HVS scaler, and the chroma siting default See: raspberrypi/linux#7630 kernel: Make the MXL86110 LEDs emulate the BCM54210 See: raspberrypi/linux#7640 kernel: Starvis2 sensor driver support (IMX662) See: raspberrypi/linux#7615 kernel: media: i2c: arducam_64mp: Fix crop sizes for 9152x6944 and 8000x6000 See: raspberrypi/linux#7652 kernel: hwmon: rp1-adc: fix spinlock leak on errors See: raspberrypi/linux#7656 kernel: media: sony-starvis2: Correct the minimum exposure See: raspberrypi/linux#7658 kernel: overlays: i2c-rtc: Add quartz-load-femtofarads See: raspberrypi/linux#7660 kernel: dmaengine: dw-axi-dmac: Add channel abort support See: raspberrypi/linux#7654
kernel: ASoC: iqaudio-codec: Add mic-only start-up delay See: raspberrypi/linux#7535 kernel: configs: Enable CONFIG_DRM_PANIC See: raspberrypi/linux#7637 kernel: drm/vc4: fix two phase errors in the HVS scaler, and the chroma siting default See: raspberrypi/linux#7630 kernel: Make the MXL86110 LEDs emulate the BCM54210 See: raspberrypi/linux#7640 kernel: Starvis2 sensor driver support (IMX662) See: raspberrypi/linux#7615 kernel: media: i2c: arducam_64mp: Fix crop sizes for 9152x6944 and 8000x6000 See: raspberrypi/linux#7652 kernel: hwmon: rp1-adc: fix spinlock leak on errors See: raspberrypi/linux#7656 kernel: media: sony-starvis2: Correct the minimum exposure See: raspberrypi/linux#7658 kernel: overlays: i2c-rtc: Add quartz-load-femtofarads See: raspberrypi/linux#7660 kernel: dmaengine: dw-axi-dmac: Add channel abort support See: raspberrypi/linux#7654
dmaengine: dw-axi-dmac: Add channel abort support
Disabling a channel will stall and timeout if it is currently
transferring to or from a slow peripheral with handshaking (which they
all have). When that happens, use the channels "abort" feature to
unblock the channel.
See: #7642