Fix two more RP1 DMA bugs#6734
Merged
pelwell merged 2 commits intoraspberrypi:rpi-6.12.yfrom Mar 20, 2025
Merged
Conversation
axi_desc_put often gets called in error paths, and so can't assume that the descriptor passed in has been completely initialised. Guard against unallocated LLIs. See: raspberrypi#6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
Remove a bogus memory alignment check - transfers will be run bytewise if needed - and add a check that the overall length is multiple of the register size, otherwise there is residue. See: raspberrypi#6733 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
popcornmix
approved these changes
Mar 20, 2025
P33M
reviewed
Mar 20, 2025
| return -EINVAL; | ||
| } | ||
|
|
||
| if (len % reg_width) { |
Contributor
There was a problem hiding this comment.
(Thinking aloud, not an issue at the moment) I wonder if use-cases that have memory buffers spanning a page boundary with odd alignment are broken when using this driver - and this error message makes this case known.
But fixing this means rewriting dw_axi_dma_chan_prep_[cyclic|slave]_sg to dynamically allocate hardware descriptors inside for_each_sg().
popcornmix
added a commit
to raspberrypi/firmware
that referenced
this pull request
Mar 25, 2025
kernel: fixup! dmaengine: dw-axi-dmac: Fixes for RP1 See: raspberrypi/linux#6729 kernel: drm/vc4: Correct arithmetic for shifting between columns of SAND images See: raspberrypi/linux#6730 kernel: Adding Pisound Micro kernel module based on rpi-6.12.y See: raspberrypi/linux#6731 kernel: Fix two more RP1 DMA bugs See: raspberrypi/linux#6734 kernel: dts: bcm2712-rpi: Add uart0_nodma See: raspberrypi/linux#6365
popcornmix
added a commit
to raspberrypi/rpi-firmware
that referenced
this pull request
Mar 25, 2025
kernel: fixup! dmaengine: dw-axi-dmac: Fixes for RP1 See: raspberrypi/linux#6729 kernel: drm/vc4: Correct arithmetic for shifting between columns of SAND images See: raspberrypi/linux#6730 kernel: Adding Pisound Micro kernel module based on rpi-6.12.y See: raspberrypi/linux#6731 kernel: Fix two more RP1 DMA bugs See: raspberrypi/linux#6734 kernel: dts: bcm2712-rpi: Add uart0_nodma See: raspberrypi/linux#6365
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two bugs discovered while investigating #6733: