-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Improve PIO DMA performance #6994
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
+90
−18
Conversation
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
If the DMA channel allocation fails, the relevant dma_configs entry should be marked as no longer claimed, otherwise rp1_pio_sm_dma_free will be called with an error number as a DMA channel pointer. Signed-off-by: Phil Elwell <[email protected]>
Channels 0 and 1 were configured with MSIZE=8, not 16. Those channels will only issue 8-beat bursts in response to a request, so there will be a mismatch in FIFO fill levels vs thresholds. |
The DesignWare AXI DMAC IP can be configured with heterogeneous channel parameters. Allow maximum burst length to be set per-channel by making snps,axi-max-burst-len an array. Signed-off-by: Phil Elwell <[email protected]>
Add a mechanism to allow clients to prefer some DMA channels over others. This is required to allow high-bandwidth clients to request one of the two "heavy" channels, but could also be used to prevent some clients from hogging all channels. Signed-off-by: Phil Elwell <[email protected]>
Give the DMAC property "snps,axi-max-burst-len" a value for each DMA channel, encoding the fact that channels 1 and 2 are more capable ("heavy"). Signed-off-by: Phil Elwell <[email protected]>
PIO benefits from increased DMA bandwidth when used with DMA channels 0 or 1, because they support longer bursts. Add DMA channel selection attributes to prevent other users from claiming them. Signed-off-by: Phil Elwell <[email protected]>
Improve DMA performance by increasing the burst size to 8. Signed-off-by: Phil Elwell <[email protected]>
I knew that, on some level. Updated with the 16s changed to 8s, and with the rp1-pio code changes broken out into a separate commit (as it should always have been). |
popcornmix
added a commit
to raspberrypi/firmware
that referenced
this pull request
Aug 20, 2025
kernel: INA260 driver support 70fb84a109c639637f0636281dbdb21ed8ffb000 upstream See: raspberrypi/linux#7004 kernel: drivers: media: pisp_be: Fix for job queue removal in stop_streaming See: raspberrypi/linux#6999 kernel: Improve PIO DMA performance See: raspberrypi/linux#6994
popcornmix
added a commit
to raspberrypi/rpi-firmware
that referenced
this pull request
Aug 20, 2025
kernel: INA260 driver support 70fb84a109c639637f0636281dbdb21ed8ffb000 upstream See: raspberrypi/linux#7004 kernel: drivers: media: pisp_be: Fix for job queue removal in stop_streaming See: raspberrypi/linux#6999 kernel: Improve PIO DMA performance See: raspberrypi/linux#6994
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.
The RP1 DMA controller configuration makes channels 1 and 2 more capable than the others. Add a mechanism to reserve those channels for the PIO block. There may be other ways to improve the DMA bandwidth when talking to the PIO block, but this alone more than doubles the throughput.