From: Vikash Garodia <vikash.garodia@oss.qualcomm.com>
To: Robin Murphy <robin.murphy@arm.com>,
Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Cc: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>,
Abhinav Kumar <abhinav.kumar@linux.dev>,
Bryan O'Donoghue <bod@kernel.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Saravana Kannan <saravanak@kernel.org>,
Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
Stefan Schmidt <stefan.schmidt@linaro.org>,
Hans Verkuil <hverkuil@kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Vishnu Reddy <busanna.reddy@oss.qualcomm.com>,
Hans Verkuil <hverkuil+cisco@kernel.org>,
linux-arm-msm@vger.kernel.org, linux-media@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
iommu@lists.linux.dev,
Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
Charan Teja Kalla <charan.kalla@oss.qualcomm.com>,
Vijayanand Jitta <vijayanand.jitta@oss.qualcomm.com>
Subject: Re: [PATCH 3/7] of/iommu: add multi-map support
Date: Tue, 17 Feb 2026 18:38:56 +0530 [thread overview]
Message-ID: <1c3c36b9-7367-462f-8280-16477d3ad20d@oss.qualcomm.com> (raw)
In-Reply-To: <78ffd1ce-5408-4bf5-a782-0c4ca14017b1@arm.com>
On 1/27/2026 7:50 PM, Robin Murphy wrote:
> On 2026-01-27 11:45 am, Dmitry Baryshkov wrote:
>> On Mon, Jan 26, 2026 at 05:55:46PM +0530, Vikash Garodia wrote:
>>> From: Charan Teja Kalla <charan.kalla@oss.qualcomm.com>
>>>
>>> When multiple mappings are present for an input id, linux matches just
>>> the first one. There is a usecase[1] where all the mappings are to be
>>> maintained in parallel for an iommu-map entry of a same input id.
>>
>> This contradicts the IOMMU idealogy (at least as far as I understood it
>> fom the maintainers): the device (driver) doesn't control which IOMMUs
>> are getting used. Instead _all_ defined entries should get used. For
>> iommu-map it means that if the map defines several entries for a single
>> function, then all entries should always get mapped.
>
> Indeed there is no concept of "multi-map" - if a single input ID
> represents more than one thing then that notion of "input ID" is
> fundamentally wrong. A single *device* may have multiple IDs, as in the
> case of PCI bridge aliasing, but in that case there are multiple things
> to map.
Let me take examples of kaanapali and sm8550 and describe the vpu stream
id generation part,
kaanapali:
iommu-map = <0x100 &apps_smmu 0x1940 0x0 0x1>,
<0x100 &apps_smmu 0x1a20 0x0 0x1>,
....
sm8550:
iommus = <&apps_smmu 0x1940 0>,
<&apps_smmu 0x1947 0>;
In kaanapali, 0x1940 and 0x1a20 are the *resultant* stream-IDs. The
resultant stream-id is generated based on
c-SID --> generated by vpu hardware, controlled by video firmware
programming.
Topo ID --> port id, port at which vpu is connected to NOC, decided by
vpu hardware.
TBU - smmu translation buffer unit, decided at soc design time.
Now if we take 0x1940 and 0x1a20, c-SID is same i.e 0. Within VPU, we
have video engine (vcodec) and processor, both have different TOPO ID in
kaanapali, whereas in sm8550, both have same TOPO ID. So vcodec and
processor may (sm8550) or may not (kaanapali) have same stream-id.
There are some buffers, like internal buffers, are accessed by both,
which then need both the stream-ids to be mapped into single context bank.
If you see sm8550, the requirement for both those hardware to access
internal buffer is still there, since they have same c-SID, same topo id
and tbu id, they have same stream id (0x1940)
Regards,
Vikash
>
> Thanks,
> Robin.
next prev parent reply other threads:[~2026-02-17 13:09 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-26 12:25 [PATCH 0/7] media: iris: add support for kaanapali platform Vikash Garodia
2026-01-26 12:25 ` [PATCH 1/7] media: dt-bindings: qcom-kaanapali-iris: Add kaanapali video codec binding Vikash Garodia
2026-01-26 13:46 ` Rob Herring (Arm)
2026-01-27 15:09 ` Dmitry Baryshkov
2026-02-17 13:43 ` Vikash Garodia
2026-02-17 14:36 ` Dmitry Baryshkov
2026-02-17 15:34 ` Vikash Garodia
2026-02-17 16:15 ` Dmitry Baryshkov
2026-02-17 18:09 ` Vikash Garodia
2026-02-17 18:35 ` Dmitry Baryshkov
2026-02-17 17:05 ` Krzysztof Kozlowski
2026-01-26 12:25 ` [PATCH 2/7] of: factor out of_map_id() code Vikash Garodia
2026-02-02 14:52 ` Bryan O'Donoghue
2026-02-03 10:13 ` Vijayanand Jitta
2026-02-04 1:11 ` Dmitry Baryshkov
2026-02-05 8:09 ` Vijayanand Jitta
2026-02-05 14:53 ` Dmitry Baryshkov
2026-01-26 12:25 ` [PATCH 3/7] of/iommu: add multi-map support Vikash Garodia
2026-01-27 11:45 ` Dmitry Baryshkov
2026-01-27 13:51 ` Nicolas Dufresne
2026-01-27 14:20 ` Robin Murphy
2026-02-02 10:56 ` Vijayanand Jitta
2026-02-17 13:08 ` Vikash Garodia [this message]
2026-03-03 18:50 ` Vikash Garodia
2026-02-02 14:57 ` Bryan O'Donoghue
2026-02-03 10:52 ` Vijayanand Jitta
2026-01-26 12:25 ` [PATCH 4/7] media: iris: Switch to hardware mode after firmware boot Vikash Garodia
2026-02-02 15:09 ` Bryan O'Donoghue
2026-02-17 14:11 ` Vikash Garodia
2026-01-26 12:25 ` [PATCH 5/7] media: iris: add context bank devices using iommu-map Vikash Garodia
2026-01-27 14:49 ` Robin Murphy
2026-02-02 12:00 ` Vikash Garodia
2026-02-17 13:15 ` Vikash Garodia
2026-01-26 12:25 ` [PATCH 6/7] media: iris: add helper to select context bank device Vikash Garodia
2026-01-26 12:25 ` [PATCH 7/7] media: iris: Add platform data for kaanapali Vikash Garodia
2026-01-26 13:38 ` [PATCH 0/7] media: iris: add support for kaanapali platform Dmitry Baryshkov
2026-01-27 11:26 ` Vikash Garodia
2026-01-27 11:52 ` Dmitry Baryshkov
2026-01-27 15:10 ` Nicolas Dufresne
2026-01-27 15:59 ` Vikash Garodia
2026-01-27 16:58 ` Nicolas Dufresne
2026-01-27 16:11 ` Vikash Garodia
2026-01-27 16:49 ` Dmitry Baryshkov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1c3c36b9-7367-462f-8280-16477d3ad20d@oss.qualcomm.com \
--to=vikash.garodia@oss.qualcomm.com \
--cc=abhinav.kumar@linux.dev \
--cc=bod@kernel.org \
--cc=bryan.odonoghue@linaro.org \
--cc=busanna.reddy@oss.qualcomm.com \
--cc=charan.kalla@oss.qualcomm.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dikshita.agarwal@oss.qualcomm.com \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=hverkuil+cisco@kernel.org \
--cc=hverkuil@kernel.org \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=robh@kernel.org \
--cc=robin.murphy@arm.com \
--cc=saravanak@kernel.org \
--cc=stefan.schmidt@linaro.org \
--cc=vijayanand.jitta@oss.qualcomm.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®