mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
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:
committed by
mobile promotions
parent
720402ba74
commit
4ce9c114d5
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user