Message ID | fb3b357fbbdf61a20609f38a817c3f45ebc238fc.1495498184.git.digetx@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, May 23, 2017 at 03:16:32AM +0300, Dmitry Osipenko wrote: > There is no IOMMU on Tegra20, instead a GART would be picked as an IOMMU > provider. > > Signed-off-by: Dmitry Osipenko <digetx@gmail.com> > --- > drivers/gpu/drm/tegra/drm.c | 5 ++++- > drivers/gpu/host1x/dev.c | 5 ++++- > 2 files changed, 8 insertions(+), 2 deletions(-) Not sure what the context here is or if the patches need to merged with the rest of the patch-set, so: Acked-by: Joerg Roedel <jroedel@suse.de>
On 30.05.2017 12:21, Joerg Roedel wrote: > On Tue, May 23, 2017 at 03:16:32AM +0300, Dmitry Osipenko wrote: >> There is no IOMMU on Tegra20, instead a GART would be picked as an IOMMU >> provider. >> >> Signed-off-by: Dmitry Osipenko <digetx@gmail.com> >> --- >> drivers/gpu/drm/tegra/drm.c | 5 ++++- >> drivers/gpu/host1x/dev.c | 5 ++++- >> 2 files changed, 8 insertions(+), 2 deletions(-) > > Not sure what the context here is or if the patches need to merged with > the rest of the patch-set, so: > > Acked-by: Joerg Roedel <jroedel@suse.de> > Probably I would have to add you on the CC to the cover latter, sorry. These two patches do not depend on the rest of the patchset, I just aggregated all the patches into a series for ease of managing them for me and maintainers. Thank you for the ack!
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 <digetx@gmail.com> > --- > 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 <drm/drm_atomic.h> > #include <drm/drm_atomic_helper.h> > > +#include <soc/tegra/fuse.h> > + > #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 <linux/of.h> > #include <linux/slab.h> > > +#include <soc/tegra/fuse.h> > + > #define CREATE_TRACE_POINTS > #include <trace/events/host1x.h> > #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.
On 06/01/2017 11:36 AM, Dmitry Osipenko wrote: > 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 <digetx@gmail.com> >> --- >> 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 <drm/drm_atomic.h> >> #include <drm/drm_atomic_helper.h> >> >> +#include <soc/tegra/fuse.h> >> + >> #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 <linux/of.h> >> #include <linux/slab.h> >> >> +#include <soc/tegra/fuse.h> >> + >> #define CREATE_TRACE_POINTS >> #include <trace/events/host1x.h> >> #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. > My recommendation is of_machine_is_compatible() Cheers, Mikko
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 <drm/drm_atomic.h> #include <drm/drm_atomic_helper.h> +#include <soc/tegra/fuse.h> + #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 <linux/of.h> #include <linux/slab.h> +#include <soc/tegra/fuse.h> + #define CREATE_TRACE_POINTS #include <trace/events/host1x.h> #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;
There is no IOMMU on Tegra20, instead a GART would be picked as an IOMMU provider. Signed-off-by: Dmitry Osipenko <digetx@gmail.com> --- drivers/gpu/drm/tegra/drm.c | 5 ++++- drivers/gpu/host1x/dev.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-)