]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
gpu: host1x: Resize channel register region on Tegra186 and later
authorThierry Reding <treding@nvidia.com>
Mon, 19 Nov 2018 10:27:39 +0000 (11:27 +0100)
committerThierry Reding <treding@nvidia.com>
Tue, 27 Nov 2018 16:18:26 +0000 (17:18 +0100)
The register region allocated per channel was decreased from 16384 bytes
to 256 bytes on Tegra186 and later. Resize the region to make sure every
channel (instead of only the first) is properly programmed.

Suggested-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/host1x/hw/channel_hw.c

index d188f9068b9109c707d7ec6b5d9f826e6e1fe11d..95ea81172a83460d95139428d64f980f460c3263 100644 (file)
@@ -26,7 +26,6 @@
 #include "../intr.h"
 #include "../job.h"
 
-#define HOST1X_CHANNEL_SIZE 16384
 #define TRACE_MAX_LENGTH 128U
 
 static void trace_write_gather(struct host1x_cdma *cdma, struct host1x_bo *bo,
@@ -203,7 +202,11 @@ static void enable_gather_filter(struct host1x *host,
 static int host1x_channel_init(struct host1x_channel *ch, struct host1x *dev,
                               unsigned int index)
 {
-       ch->regs = dev->regs + index * HOST1X_CHANNEL_SIZE;
+#if HOST1X_HW < 6
+       ch->regs = dev->regs + index * 0x4000;
+#else
+       ch->regs = dev->regs + index * 0x100;
+#endif
        enable_gather_filter(dev, ch);
        return 0;
 }