public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lucas Stach <dev@lynxeye.de>
To: Stephen Warren <swarren@wwwdotorg.org>
Cc: Thierry Reding <thierry.reding@avionic-design.de>,
	Hiroshi DOYU <hdoyu@nvidia.com>,
	linux-tegra@vger.kernel.org, Joerg Roedel <joerg.roedel@amd.com>,
	Bharat Nihalani <bnihalani@nvidia.com>,
	Vandana Salve <vsalve@nvidia.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] iommu/tegra: gart: Reserve iomem resource
Date: Mon, 21 May 2012 19:05:35 +0200	[thread overview]
Message-ID: <1337619935.1621.13.camel@tellur> (raw)
In-Reply-To: <4FBA702A.1010203@wwwdotorg.org>

Am Montag, den 21.05.2012, 10:41 -0600 schrieb Stephen Warren:
> On 05/21/2012 08:11 AM, Thierry Reding wrote:
> > * Hiroshi DOYU wrote:
> >> GART Register/Aperture range should be reserved.
> ...
> >> diff --git a/drivers/iommu/tegra-gart.c
> >> b/drivers/iommu/tegra-gart.c
> ...
> >> +	if (!devm_request_mem_region(dev, res_remap->start, +
> >> resource_size(res_remap), dev_name(dev))) { +		dev_err(dev,
> >> "failed to reserve GART aperture\n"); +		return -EBUSY; +	} +
> > 
> > I'm not so sure that this is a good idea. If the GART driver
> > requests the GART aperture, then users of the GART aperture (e.g.
> > the DRM driver) will no longer be able to use it.
> 
> Presumably the DRM driver would be obtaining access to parts of the
> GART aperture through the GART driver, rather than just grabbing the
> IO region and using it for itself?

With a TTM-like memory manager the DRM driver will take over the address
space management of the GART aperture. The GART driver is only used to
set up the mappings in the IOMMU. The DRM driver is the one that sets
up/tears down the CPU mappings on demand, so the aperture should be
claimed in the DRM driver.

-- Lucas



  reply	other threads:[~2012-05-21 17:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-14 18:12 [PATCH 1/2] iommu/tegra: gart: Remove unnecessary cleanup with devm_*() Hiroshi DOYU
2012-05-14 18:12 ` [PATCH 2/2] iommu/tegra: gart: Reserve iomem resource Hiroshi DOYU
2012-05-21 14:11   ` Thierry Reding
2012-05-21 16:41     ` Stephen Warren
2012-05-21 17:05       ` Lucas Stach [this message]
2012-05-21 17:14         ` Stephen Warren
2012-05-21 17:31           ` Thierry Reding
2012-05-21 17:38             ` Lucas Stach
2012-06-18 10:37               ` Hiroshi Doyu
2012-06-18 21:14                 ` Lucas Stach
2012-05-21 17:38             ` Thierry Reding
2012-05-21 14:16 ` [PATCH 1/2] iommu/tegra: gart: Remove unnecessary cleanup with devm_*() Thierry Reding

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=1337619935.1621.13.camel@tellur \
    --to=dev@lynxeye.de \
    --cc=bnihalani@nvidia.com \
    --cc=hdoyu@nvidia.com \
    --cc=joerg.roedel@amd.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=swarren@wwwdotorg.org \
    --cc=thierry.reding@avionic-design.de \
    --cc=vsalve@nvidia.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