From 2566977072104b7fe03e7bad4a0bb1b8c26f87ab Mon Sep 17 00:00:00 2001 From: Vedashree Vidwans Date: Wed, 25 Nov 2020 16:58:30 -0800 Subject: [PATCH] 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 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2451139 Tested-by: mobile promotions Reviewed-by: mobile promotions --- drivers/gpu/nvgpu/os/linux/platform_gk20a_tegra.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/nvgpu/os/linux/platform_gk20a_tegra.c b/drivers/gpu/nvgpu/os/linux/platform_gk20a_tegra.c index 9f1eb2de2..20470028f 100644 --- a/drivers/gpu/nvgpu/os/linux/platform_gk20a_tegra.c +++ b/drivers/gpu/nvgpu/os/linux/platform_gk20a_tegra.c @@ -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);