gpu: nvgpu: Fix secure buffer size for 64K PAGES

Increment secure buffer size by 64K when page size is 64K.
This fixes the secure buffer allocation issue as otherwise the buffer
runs out of space.

Bug 2441531

Change-Id: I16741341bcaca2fee093adef4c461a42124cd928
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1943609
Reviewed-by: Rohit Khanna <rokhanna@nvidia.com>
Tested-by: Rohit Khanna <rokhanna@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Alex Waterman
2018-11-05 15:37:38 -08:00
committed by mobile promotions
parent 720402ba74
commit 4ce9c114d5

View File

@@ -630,6 +630,9 @@ int gk20a_tegra_init_secure_alloc(struct gk20a_platform *platform)
if (nvgpu_is_enabled(g, NVGPU_IS_FMODEL))
return 0;
#if PAGE_SIZE > 4096
platform->secure_buffer_size += SZ_64K;
#endif
dma_set_attr(DMA_ATTR_NO_KERNEL_MAPPING, __DMA_ATTR(attrs));
(void)dma_alloc_attrs(&tegra_vpr_dev, platform->secure_buffer_size, &iova,
GFP_KERNEL, __DMA_ATTR(attrs));