Skip to content

[PATCH] dma: dw-axi-dmac: ensure segment lengths obey reg_width limits #7543

Description

@hverkuil

Describe the bug

While experimenting with the rp1-pio driver of the Raspberry Pi 5 I got 'length X not aligned to device width 4" messages, preventing the DMA to work.

Debugging showed that the dw_axi_dma_chan_prep_slave_sg() did not take the reg_width into account.

Patch fixing this is attached.

0001-dma-dw-axi-dmac-ensure-segment-lengths-obey-reg_widt.patch

Steps to reproduce the behaviour

Test utility is found here: https://git.linuxtv.org/hverkuil/hdmi-dbg-ctl.git/tree/utils/hdmi-pio?h=hdmi-dbg-ctl-v2

gcc -o hdmi-pio hdmi-pio.c
./hdmi-pio 20 2 10 # sample GPIO 20+21 at 10 MHz

Device (s)

Raspberry Pi 5

System

$ cat /etc/rpi-issue
Raspberry Pi reference 2024-11-19
Generated using pi-gen, https://github.com/RPi-Distro/pi-gen, 891df1e21ed2b6099a2e6a13e26c91dea44b34d4, stage4
$ vcgencmd version
2026/06/17 00:06:53
Copyright (c) 2012 Broadcom
version 6219bf00 (release) (embedded)
$ uname -a
Linux rpi5 6.18.42-rpi5 #20 SMP PREEMPT Sun Aug 9 10:17:09 CEST 2026 aarch64 GNU/Linux

Logs

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions