Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpu: host1x: Resize channel register region on Tegra186 and later

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>

+5 -2
+5 -2
drivers/gpu/host1x/hw/channel_hw.c
··· 26 26 #include "../intr.h" 27 27 #include "../job.h" 28 28 29 - #define HOST1X_CHANNEL_SIZE 16384 30 29 #define TRACE_MAX_LENGTH 128U 31 30 32 31 static void trace_write_gather(struct host1x_cdma *cdma, struct host1x_bo *bo, ··· 202 203 static int host1x_channel_init(struct host1x_channel *ch, struct host1x *dev, 203 204 unsigned int index) 204 205 { 205 - ch->regs = dev->regs + index * HOST1X_CHANNEL_SIZE; 206 + #if HOST1X_HW < 6 207 + ch->regs = dev->regs + index * 0x4000; 208 + #else 209 + ch->regs = dev->regs + index * 0x100; 210 + #endif 206 211 enable_gather_filter(dev, ch); 207 212 return 0; 208 213 }