Re: [PATCH v2 1/9] dt-bindings: dma: nvidia,tegra186-gpc-dma: Add iommu-map property

Jon Hunter
2026-03-03T17:34:08Z

On 03/03/2026 17:14, Akhil R wrote:
> On Tue, 3 Mar 2026 13:09:00 +0000, Jon Hunter wrote:
>> On 03/03/2026 08:40, Akhil R wrote:
>>
>> ...
>>
>>>> Why is this flexible? If it is, means usually items are distinctive, so
>>>> I would expect defining/listing them. If they are not distinctive,
>>>> commit msg is incorrect. If the list is as simple as 1-to-1 channel
>>>> mapping, just add it in the description how they are ordered.
>>>
>>> Yes, it is a 1-to-1 channel mapping to an IOMMU ID. The intent of making
>>> it flexible is to allow non-consecutive IOMMU ID assignments as well.
>>> This is particularly needed in virtualised environments where the
>>> hypervisor may reserve certain stream IDs, and the guest VM can map only
>>> the permitted ones. Shall I add a description here mentioning this
>>> use-case?
>>
>> Isn't this already handled by the 'dma-channel-mask' property? The
>> driver will skip over any channels that are not in specified by the mask.
>
> dma-channel-mask would not help if a channel is exposed, and the
> corresponding IOMMU ID is not exposed. For instance say channel 15 is
> available for a VM, but not the stream ID 0x80f.

Is that a valid configuration? Above we said it is a 1-to-1 mapping
which would imply the mapping is always constant. Ie. same channels maps
to name SID. Is that not the case?

Jon

--
nvpublic