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

Aberta
#7,543 4 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
55/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Pouca atividade
Stack de tecnologia
c, linux, raspberry-pi

Direção de pesquisa

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.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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

Linguagem predominante
C
Estrelas
13.3k
Forks
5.5k
Merge médio
3d 20h
PRs com merge (30d)
27

Preparar o ambiente

Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de raspberrypi/linux

Todas as issues de raspberrypi/linux

Issues semelhantes

Mais issues de C

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.