Re: [PATCH v6 0/9] dmaengine: add DMA channel bus and fsl-edma per-channel IOMMU support

From: Peng Fan

Date: Sat Nov 21 2026 - 08:03:02 EST


Hi Jason, and all

On Tue, Nov 17, 2026 at 09:00:05AM -0400, Jason Gunthorpe wrote:
>>

[...]

>> I may not describe it clear in cover-letter.
>>
>> I understand the concern. Let me explain why I believe it is justified here
>> rather than a hack.
>>
>> On i.MX eDMA each channel has its own interrupt, its own register region,
>> and on i.MX8QM even its own power domain. Each channel may also have its
>> own Stream ID, or share one when SIDs are scarce. These are genuine
>> per-channel hardware resources, not software fiction.
>>
>> In dmaengine each channel is already modeled as a channel device (see
>> dmaengine_chan_dev()), and this series puts those devices on a real bus
>> (dmaengine_chan_bus_type) as a prerequisite. The DT child node simply
>> describes that existing device, so its reg/interrupts/power-domains/iommus
>> are attached per channel instead of as index-matched flat lists on the
>> controller.
>
>If they are real devices then why can't they come out as platform
>devices?
>
>I think you are overstating how independent they are. Many single
>devices have per "channel" resources like MMIO and IRQs. That's
>totally normal. It doesn't make the sub resources independent devices.
>
>AFAICT what you have here is some HW designer used SID where they
>should have used SSID and you are trying to hack DT to make that
>usable because Linux does not support a SID as SSID model today.
>
>Again, since this is the 3rd - 4th case like this, it seems like a
>popular hardware choice and we should try to do better to make Linux
>support if we can.

Let's put i.MX eDMA aside, I have one general question regarding
dma channel DMA.

The below two drivers[1] has chan_dma_dev set as true which means they use
dma channel device to do dma memory allocation. And for tegra186, it
use dma channel device for iommu, the buggy part is that it forces
chan dev's bus to platform bus.

Do you think it is reasonable to have chan device(not platform device) do dma
allocation? I ask because if we allow chan device to do dma allocation, we need
to provide a dma channel bus for iommu_buses to fix tegre186(TBH, I
am not familar with this platform, it even has iommu-map for the dma node).

[1] drivers/dma/tegra186-gpc-dma.c
drivers/dma/ti/k3-udma.c
https://elixir.bootlin.com/linux/v7.4-rc1/A/ident/chan_dma_dev

Thanks
Peng

>
>Jason