From 50bac83c80dd20e6c6b80afccadf5c70cbbc816e Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Wed, 26 Sep 2018 16:09:46 +0200 Subject: gpu: host1x: Remove spurious tab All other assignments have a single space around the = sign, so remove the spurious tab for consistency. Signed-off-by: Thierry Reding --- drivers/gpu/host1x/bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/gpu/host1x') diff --git a/drivers/gpu/host1x/bus.c b/drivers/gpu/host1x/bus.c index 815bdb42e3f0..b4c385d4a6af 100644 --- a/drivers/gpu/host1x/bus.c +++ b/drivers/gpu/host1x/bus.c @@ -331,7 +331,7 @@ static const struct dev_pm_ops host1x_device_pm_ops = { struct bus_type host1x_bus_type = { .name = "host1x", .match = host1x_device_match, - .dma_configure = host1x_dma_configure, + .dma_configure = host1x_dma_configure, .pm = &host1x_device_pm_ops, }; -- cgit v1.2.3 From e31c8ea5aff8670275e4e451fdc3bca5fbc8a528 Mon Sep 17 00:00:00 2001 From: Dmitry Osipenko Date: Thu, 30 Aug 2018 03:12:47 +0300 Subject: gpu: host1x: Detach Host1x from IOMMU DMA domain on arm32 Host1x is getting attached to an implicit IOMMU DMA domain if CONFIG_ARM_DMA_USE_IOMMU=y. Since Host1x driver manages IOMMU by itself, Host1x device must be detached from the implicit domain using arch-specific IOMMU-API. Signed-off-by: Dmitry Osipenko Signed-off-by: Thierry Reding --- drivers/gpu/host1x/dev.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'drivers/gpu/host1x') diff --git a/drivers/gpu/host1x/dev.c b/drivers/gpu/host1x/dev.c index d88073e7d22d..de6bc4e7fa23 100644 --- a/drivers/gpu/host1x/dev.c +++ b/drivers/gpu/host1x/dev.c @@ -29,6 +29,10 @@ #include #undef CREATE_TRACE_POINTS +#if IS_ENABLED(CONFIG_ARM_DMA_USE_IOMMU) +#include +#endif + #include "bus.h" #include "channel.h" #include "debug.h" @@ -217,7 +221,14 @@ static int host1x_probe(struct platform_device *pdev) dev_err(&pdev->dev, "failed to get reset: %d\n", err); return err; } - +#if IS_ENABLED(CONFIG_ARM_DMA_USE_IOMMU) + if (host->dev->archdata.mapping) { + struct dma_iommu_mapping *mapping = + to_dma_iommu_mapping(host->dev); + arm_iommu_detach_device(host->dev); + arm_iommu_release_mapping(mapping); + } +#endif if (IS_ENABLED(CONFIG_TEGRA_HOST1X_FIREWALL)) goto skip_iommu; -- cgit v1.2.3