video: tegra: nvmap: Add helper functions for nvmap_heap

- Move all data structures from nvmap_heap.h header file to
nvmap_alloc_int.h file as they are owned by nvmap_alloc unit.
- Provide getter and setter functions to get or set the members of these
data structures.
- Provide forward declaration of such data structures.
- Remove nvmap_heap.h header file as nvmap_heap is part of the
nvmap_alloc unit and nvmap_alloc unit exposes nvmap_alloc.h as header
file to other units.

JIRA TMM-5621

Change-Id: I2c4dd95a1a1011e4a7c1b425aa7521c6f13202da
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3201354
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Ketan Patil
2024-08-26 11:37:34 +00:00
committed by Jon Hunter
parent 98b0460f42
commit 8971a981c5
11 changed files with 196 additions and 135 deletions

View File

@@ -196,7 +196,7 @@ static struct sg_table *nvmap_dmabuf_map_dma_buf(struct dma_buf_attachment *atta
goto err_map;
} else if (!(nvmap_dev->dynamic_dma_map_mask &
info->handle->heap_type)) {
sg_dma_address(sgt->sgl) = info->handle->carveout->base;
sg_dma_address(sgt->sgl) = nvmap_get_heap_block_base(info->handle->carveout);
} else if (info->handle->heap_type == NVMAP_HEAP_CARVEOUT_VPR &&
access_vpr_phys(attach->dev)) {
sg_dma_address(sgt->sgl) = 0;