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

Aperta
#7,543 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
55/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
c, linux, raspberry-pi

Direzione di ricerca

Start with dw_axi_dma_chan_prep_slave_sg() and review the attached patch, then use utils/hdmi-pio/hdmi-pio.c from the linked hdmi-dbg-ctl repository to reproduce the alignment error on a Raspberry Pi 5. Done means the DMA path accepts segment lengths consistent with reg_width and the sample command no longer reports the device-width alignment failure.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
C
Stelle
13.3k
Fork
5.5k
Merge medio
3g 20h
PR unite (30g)
27

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di raspberrypi/linux

Tutte le issue di raspberrypi/linux

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.