summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/host1x/hw/intr_hw.c
diff options
context:
space:
mode:
authorMikko Perttunen <mperttunen@nvidia.com>2017-09-05 11:43:05 +0300
committerThierry Reding <treding@nvidia.com>2017-10-20 14:19:51 +0200
commitf1b53c4e2c08cbd805a2fdede0026edb30b59602 (patch)
treed18d03098fc02315536684af112fdd4ebbbf0146 /drivers/gpu/host1x/hw/intr_hw.c
parentd3b3efa1705833aa1b7f55ea9b2ed09e48e957a7 (diff)
downloadlinux-stable-f1b53c4e2c08cbd805a2fdede0026edb30b59602.tar.gz
linux-stable-f1b53c4e2c08cbd805a2fdede0026edb30b59602.tar.bz2
linux-stable-f1b53c4e2c08cbd805a2fdede0026edb30b59602.zip
gpu: host1x: Add Tegra186 support
Add support for the implementation of Host1x present on the Tegra186. The register space has been shuffled around a little bit, requiring addition of some chip-specific code sections. Tegra186 also adds several new features, most importantly the hypervisor, but those are not yet supported with this commit. Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com> Reviewed-by: Dmitry Osipenko <digetx@gmail.com> Tested-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers/gpu/host1x/hw/intr_hw.c')
-rw-r--r--drivers/gpu/host1x/hw/intr_hw.c29
1 files changed, 18 insertions, 11 deletions
diff --git a/drivers/gpu/host1x/hw/intr_hw.c b/drivers/gpu/host1x/hw/intr_hw.c
index 37ebb51703fa..329239237090 100644
--- a/drivers/gpu/host1x/hw/intr_hw.c
+++ b/drivers/gpu/host1x/hw/intr_hw.c
@@ -72,6 +72,23 @@ static void _host1x_intr_disable_all_syncpt_intrs(struct host1x *host)
}
}
+static void intr_hw_init(struct host1x *host, u32 cpm)
+{
+#if HOST1X_HW < 6
+ /* disable the ip_busy_timeout. this prevents write drops */
+ host1x_sync_writel(host, 0, HOST1X_SYNC_IP_BUSY_TIMEOUT);
+
+ /*
+ * increase the auto-ack timout to the maximum value. 2d will hang
+ * otherwise on Tegra2.
+ */
+ host1x_sync_writel(host, 0xff, HOST1X_SYNC_CTXSW_TIMEOUT_CFG);
+
+ /* update host clocks per usec */
+ host1x_sync_writel(host, cpm, HOST1X_SYNC_USEC_CLK);
+#endif
+}
+
static int
_host1x_intr_init_host_sync(struct host1x *host, u32 cpm,
void (*syncpt_thresh_work)(struct work_struct *))
@@ -92,17 +109,7 @@ _host1x_intr_init_host_sync(struct host1x *host, u32 cpm,
return err;
}
- /* disable the ip_busy_timeout. this prevents write drops */
- host1x_sync_writel(host, 0, HOST1X_SYNC_IP_BUSY_TIMEOUT);
-
- /*
- * increase the auto-ack timout to the maximum value. 2d will hang
- * otherwise on Tegra2.
- */
- host1x_sync_writel(host, 0xff, HOST1X_SYNC_CTXSW_TIMEOUT_CFG);
-
- /* update host clocks per usec */
- host1x_sync_writel(host, cpm, HOST1X_SYNC_USEC_CLK);
+ intr_hw_init(host, cpm);
return 0;
}