summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/host1x/dev.h
diff options
context:
space:
mode:
authorMikko Perttunen2016-12-14 12:16:14 +0100
committerThierry Reding2017-04-05 18:11:43 +0200
commit404bfb78daf3bedafb0bfab24947059575cbea3d (patch)
tree59b8ed6b140ce74ffeb94e1488ee7818f3b02c18 /drivers/gpu/host1x/dev.h
parentgpu: host1x: Fix potential out-of-bounds access (diff)
downloadkernel-qcow2-linux-404bfb78daf3bedafb0bfab24947059575cbea3d.tar.gz
kernel-qcow2-linux-404bfb78daf3bedafb0bfab24947059575cbea3d.tar.xz
kernel-qcow2-linux-404bfb78daf3bedafb0bfab24947059575cbea3d.zip
gpu: host1x: Add IOMMU support
Add support for the Host1x unit to be located behind an IOMMU. This is required when gather buffers may be allocated non-contiguously in physical memory, as can be the case when TegraDRM is also using the IOMMU. Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/host1x/dev.h')
-rw-r--r--drivers/gpu/host1x/dev.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/host1x/dev.h b/drivers/gpu/host1x/dev.h
index 06dd4f85125f..e5113acecd7a 100644
--- a/drivers/gpu/host1x/dev.h
+++ b/drivers/gpu/host1x/dev.h
@@ -19,6 +19,8 @@
#include <linux/platform_device.h>
#include <linux/device.h>
+#include <linux/iommu.h>
+#include <linux/iova.h>
#include "channel.h"
#include "syncpt.h"
@@ -108,6 +110,10 @@ struct host1x {
struct device *dev;
struct clk *clk;
+ struct iommu_domain *domain;
+ struct iova_domain iova;
+ dma_addr_t iova_end;
+
struct mutex intr_mutex;
int intr_syncpt_irq;