All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Lucas Stach <l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
Cc: Mikko Perttunen
	<mperttunen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Re: [PATCH v2 1/7] drm/tegra: Add Tegra DRM allocation API
Date: Wed, 14 Dec 2016 14:48:33 +0100	[thread overview]
Message-ID: <20161214134833.GA29981@ulmo.ba.sec> (raw)
In-Reply-To: <1481715331.2313.28.camel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1370 bytes --]

On Wed, Dec 14, 2016 at 12:35:31PM +0100, Lucas Stach wrote:
> Am Mittwoch, den 14.12.2016, 13:16 +0200 schrieb Mikko Perttunen:
> > Add a new IO virtual memory allocation API to allow clients to
> > allocate non-GEM memory in the Tegra DRM IOMMU domain. This is
> > required e.g. for loading client firmware when clients are attached
> > to the IOMMU domain.
> > 
> > The allocator allocates contiguous physical pages that are then
> > mapped contiguously to the IOMMU domain using the iova_domain
> > library provided by the kernel. Contiguous physical pages are
> > used so that the same allocator works also when IOMMU support
> > is disabled and therefore devices access physical memory directly.
> > 
> Why is this needed? If you use the DMA API for those buffers you should
> end up with CMA memory in the !IOMMU case and normal paged memory with
> IOMMU enabled. From my understanding this should match the requirements.

We can't currently use the DMA API for these allocations because it
doesn't allow (or at least didn't back when this was first implemented)
us to share a mapping between two devices.

The reason why we need these patches is that when IOMMU is enabled, then
the units' falcons will read memory through the IOMMU, so we must have
allocations for GEM buffers and the firmware go through the same
mechanism.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2016-12-14 13:48 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-14 11:16 [PATCH v2 0/7] Host1x IOMMU support + VIC support Mikko Perttunen
     [not found] ` <20161214111617.24548-1-mperttunen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2016-12-14 11:16   ` [PATCH v2 1/7] drm/tegra: Add Tegra DRM allocation API Mikko Perttunen
2016-12-14 11:35     ` Lucas Stach
     [not found]       ` <1481715331.2313.28.camel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2016-12-14 12:36         ` Mikko Perttunen
2016-12-14 12:56           ` Lucas Stach
     [not found]             ` <1481720206.2313.32.camel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2016-12-14 13:17               ` Mikko Perttunen
2016-12-14 13:48         ` Thierry Reding [this message]
     [not found]           ` <20161214134833.GA29981-EkSeR96xj6Pcmrwk2tT4+A@public.gmane.org>
2016-12-14 14:01             ` Lucas Stach
     [not found]               ` <1481724116.2313.39.camel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2016-12-14 14:39                 ` Thierry Reding
     [not found]                   ` <20161214143912.GA30280-EkSeR96xj6Pcmrwk2tT4+A@public.gmane.org>
2017-01-27 22:45                     ` Mikko Perttunen
2016-12-14 11:16   ` [PATCH v2 2/7] drm/tegra: Add falcon helper library Mikko Perttunen
2016-12-14 11:16   ` [PATCH v2 3/7] drm/tegra: Add VIC support Mikko Perttunen
2016-12-14 11:16   ` [PATCH v2 4/7] gpu: host1x: Add IOMMU support Mikko Perttunen
2016-12-14 11:16   ` [PATCH v2 5/7] dt-bindings: Add bindings for the Tegra VIC Mikko Perttunen
2016-12-14 11:16   ` [PATCH v2 7/7] arm64: tegra: Enable IOMMU for Host1x on Tegra210 Mikko Perttunen
2016-12-14 12:30   ` [PATCH v2 0/7] Host1x IOMMU support + VIC support Daniel Vetter
     [not found]     ` <20161214123004.urnvlqarcnp5rp4a-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2016-12-14 12:41       ` Mikko Perttunen
2016-12-14 13:05         ` Daniel Vetter
     [not found]           ` <20161214130545.gfpkosyixr5lfkkf-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2016-12-14 13:32             ` Mikko Perttunen
2016-12-14 14:11               ` Daniel Vetter
     [not found]                 ` <20161214141142.jmrofknylonhprbk-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2016-12-14 14:29                   ` Mikko Perttunen
2016-12-14 14:48                   ` Daniel Vetter
     [not found]                     ` <CAKMK7uGw3XwbPU798YJ-9eLbwhMWs7z_F-ro238RfFN8LFURtw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-12-15  2:52                       ` Sean V Kelley
2017-01-17 16:22                   ` Mikko Perttunen
2017-01-23  7:42                     ` Daniel Vetter
2016-12-14 14:18       ` Thierry Reding
2016-12-14 18:26     ` Emil Velikov
2016-12-14 11:16 ` [PATCH v2 6/7] arm64: tegra: Enable VIC on T210 Mikko Perttunen

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=20161214134833.GA29981@ulmo.ba.sec \
    --to=thierry.reding-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=l.stach-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mperttunen-DDmLM1+adcrQT0dZR+AlfA@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.