From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dmitry Osipenko Subject: Re: [PATCH 21/22] drm/tegra: Don't use IOMMU on Tegra20 Date: Thu, 1 Jun 2017 11:36:12 +0300 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: Content-Language: en-US Sender: linux-tegra-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Thierry Reding , Mikko Perttunen , Joerg Roedel Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, DRI Development , Erik Faye-Lund , Nicolas Chauvet List-Id: linux-tegra@vger.kernel.org On 23.05.2017 03:16, Dmitry Osipenko wrote: > There is no IOMMU on Tegra20, instead a GART would be picked as an IOMMU > provider. > > Signed-off-by: Dmitry Osipenko > --- > drivers/gpu/drm/tegra/drm.c | 5 ++++- > drivers/gpu/host1x/dev.c | 5 ++++- > 2 files changed, 8 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c > index 17416e1c219a..ac8f76d9475f 100644 > --- a/drivers/gpu/drm/tegra/drm.c > +++ b/drivers/gpu/drm/tegra/drm.c > @@ -15,6 +15,8 @@ > #include > #include > > +#include > + > #include "drm.h" > #include "gem.h" > > @@ -131,7 +133,8 @@ static int tegra_drm_load(struct drm_device *drm, unsigned long flags) > if (!tegra) > return -ENOMEM; > > - if (iommu_present(&platform_bus_type)) { > + if (iommu_present(&platform_bus_type) && > + tegra_get_chip_id() != TEGRA20) { > u64 carveout_start, carveout_end, gem_start, gem_end; > struct iommu_domain_geometry *geometry; > unsigned long order; > diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c > index 5c1c711a21af..56b7e6d51894 100644 > --- a/drivers/gpu/host1x/dev.c > +++ b/drivers/gpu/host1x/dev.c > @@ -25,6 +25,8 @@ > #include > #include > > +#include > + > #define CREATE_TRACE_POINTS > #include > #undef CREATE_TRACE_POINTS > @@ -177,7 +179,8 @@ static int host1x_probe(struct platform_device *pdev) > return err; > } > > - if (iommu_present(&platform_bus_type)) { > + if (iommu_present(&platform_bus_type) && > + tegra_get_chip_id() != TEGRA20) { > struct iommu_domain_geometry *geometry; > unsigned long order; > > Nicolas noticed that this breaks driver module compilation, as the `tegra_get_chip_id` is not an exported symbol. I'll consider alternatives to symbol exporting and will fix it in the new revision of the patch. -- Dmitry