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

未关闭
#7,543 4 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
55/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
冷清
技术栈
c, linux, raspberry-pi

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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

主要语言
C
星标
13.3k
派生
5.5k
平均合并
3 天 20 小时
30 天内合并 PR
27

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

raspberrypi/linux 的其他 Issue

查看 raspberrypi/linux 的全部 Issue

相似的 Issue

更多 C Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。