mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mikko Perttunen <cyndis@kapsi.fi>
To: Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt>,
	Thierry Reding <thierry.reding@gmail.com>
Cc: Mikko Perttunen <mperttunen@nvidia.com>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Philipp Zabel <p.zabel@pengutronix.de>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-tegra@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH 0/3] NVIDIA Tegra210 NVJPG support
Date: Tue, 17 Jun 2025 13:34:18 +0900	[thread overview]
Message-ID: <ccf6ab71-bdf2-4e3d-a8e5-228c24bcf3bb@kapsi.fi> (raw)
In-Reply-To: <9018994f-de55-41b3-ae45-59cccaaf8603@tecnico.ulisboa.pt>

On 6/16/25 7:23 PM, Diogo Ivo wrote:
> 
> 
> On 6/12/25 2:55 AM, Mikko Perttunen wrote:
>> On 6/12/25 12:06 AM, Thierry Reding wrote:
>>> On Wed, Jun 11, 2025 at 01:05:40PM +0100, Diogo Ivo wrote:
>>>> I have a question here, what exactly are the stream IDs? While working
>>>> on the driver this came up and I didn't manage to figure it out.
>>>
>>> Stream IDs are a way to identify memory transactions as belonging to a
>>> certain device. This comes into play when working with the IOMMU (which
>>> is a Tegra SMMU on Tegra210 and earlier, and an ARM SMMU on Tegra) and
>>> is used to isolate DMA capable devices. Basically for every stream ID
>>> you get a separate I/O address space. NVJPG will have its own address
>>> space, and so will VIC. Each device can only access whatever has been
>>> mapped to it's I/O address space. That means NVJPG can't interfere with
>>> VIC and vice-versa. And neither can any of these engines read from or
>>> write to random system memory if badly programmed.
>>>
>>> For Tegra SMMU there's no such thing as programmable stream IDs, so the
>>> stream ID is fixed for the given device.
>>>
>>> On newer chips (Tegra186 and later, or maybe it wasn't until Tegra194),
>>
>> Tegra186 and newer -- all chips with the ARM SMMU. To add a little 
>> bit, each engine can address two stream IDs, one for firmware and one 
>> for data. All user specified buffers are mapped into the data IOMMU 
>> domain, and these are switched between jobs / applications.
>>
>> As an aside, currently each engine has its own firmware stream ID, but 
>> that's a bit wasteful, since the kernel allocates a separate IOMMU 
>> domain for each. The firmwares are all read-only so they could be in a 
>> shared one. We've had to consolidate these on some platforms that ran 
>> out of IOMMU domains otherwise. Not really a concern with upstream 
>> platforms, though.
> 
> Does this dual Stream ID also apply to Tegra210?

No, only Tegra186 and later (chips with ARM SMMU).

> 
>> Also need to program the THI_STREAMID / TRANSCFG registers during boot.
> 
> Thanks,
> Diogo
> 


  reply	other threads:[~2025-06-17  4:36 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-06 10:45 Diogo Ivo
2025-06-06 10:45 ` [PATCH 1/3] drm/tegra: Add NVJPG driver Diogo Ivo
2025-06-10  3:26   ` Mikko Perttunen
2025-06-10  8:44     ` Thierry Reding
2025-06-11 11:50       ` Diogo Ivo
2025-06-11 11:47     ` Diogo Ivo
2025-06-06 10:45 ` [PATCH 2/3] arm64: tegra: Add NVJPG power-domain node Diogo Ivo
2025-06-10  4:57   ` Mikko Perttunen
2025-06-11 11:51     ` Diogo Ivo
2025-06-06 10:45 ` [PATCH 3/3] arm64: tegra: Add NVJPG node Diogo Ivo
2025-06-10  5:01   ` Mikko Perttunen
2025-06-11 11:51     ` Diogo Ivo
2025-06-10  8:58 ` [PATCH 0/3] NVIDIA Tegra210 NVJPG support Thierry Reding
2025-06-11 11:56   ` Diogo Ivo
2025-06-10  9:05 ` Thierry Reding
2025-06-10  9:52   ` Mikko Perttunen
2025-06-11 12:05     ` Diogo Ivo
2025-06-11 15:06       ` Thierry Reding
2025-06-12  1:55         ` Mikko Perttunen
2025-06-16 10:23           ` Diogo Ivo
2025-06-17  4:34             ` Mikko Perttunen [this message]
2025-06-16 10:21         ` Diogo Ivo
2025-06-17  4:40           ` Mikko Perttunen
2025-06-17  9:26             ` Diogo Ivo
2025-06-30  6:14               ` Mikko Perttunen
2025-06-30  8:52                 ` Diogo Ivo
2025-06-11 12:04   ` Diogo Ivo
2025-06-11 15:10     ` Thierry Reding
2025-06-16 10:26       ` Diogo Ivo

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=ccf6ab71-bdf2-4e3d-a8e5-228c24bcf3bb@kapsi.fi \
    --to=cyndis@kapsi.fi \
    --cc=airlied@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=diogo.ivo@tecnico.ulisboa.pt \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jonathanh@nvidia.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=mperttunen@nvidia.com \
    --cc=p.zabel@pengutronix.de \
    --cc=robh@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=thierry.reding@gmail.com \
    /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®