video: tegra: nvmap: Correct handle alignment

For the handle allocated from GPU heap, the alignment should be 2MB, as
nvmap allocates huge pages for GPU heap. Make an update for this.

Bug 4510173

Change-Id: I94e11fae2452853be2f3e0a430ee474ff88544f4
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3199230
Reviewed-by: svcacv <svcacv@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
This commit is contained in:
Ketan Patil
2024-08-23 11:16:59 +00:00
committed by Jon Hunter
parent fcd1fdd03e
commit 26287ab7ab

View File

@@ -444,7 +444,11 @@ int nvmap_alloc_handle_from_va(struct nvmap_client *client,
h->userflags = flags;
h->flags = (flags & NVMAP_HANDLE_CACHE_FLAG);
h->align = PAGE_SIZE;
if ((heap_mask & NVMAP_HEAP_CARVEOUT_GPU) != 0)
h->align = SIZE_2MB;
else
h->align = PAGE_SIZE;
tag = flags >> 16;
if (!tag && client && !client->tag_warned) {