gpu: nvgpu: add coherent_dma_mask for tegra_vpr_dev

Knext requires tegra_vpr_dev to contain non-zero coherent_dma_mask.

Bug 200677584

Change-Id: I983236e3a7b4e807e26e3421bd3a78027e596692
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2451139
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Vedashree Vidwans
2020-11-25 16:58:30 -08:00
committed by Alex Waterman
parent 82ed6cbec8
commit 2566977072

View File

@@ -671,6 +671,9 @@ int gk20a_tegra_init_secure_alloc(struct gk20a_platform *platform)
#if NVGPU_CPU_PAGE_SIZE > 4096
platform->secure_buffer_size += SZ_64K;
#endif
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)
tegra_vpr_dev.coherent_dma_mask = DMA_BIT_MASK(32);
#endif
(void)dma_alloc_attrs(&tegra_vpr_dev, platform->secure_buffer_size, &iova,
GFP_KERNEL, DMA_ATTR_NO_KERNEL_MAPPING);