tegra: hwpm: update dma buf pointer as per oot def

OOT definition of dma_buf_vmap() is changed to accept 2 arguments. The
second argumentt is used to return the dma mapping of the user buffer.
However, this output pointer is expected to point to an allocated
sma_buf_map structure. Add dma_buf_map structure as a member of struct
tegra_hwpm_mem_mgmt.

Bug 3768922

Change-Id: Ie776b7b7d0e364e6391212b9df87acbb4c43f1fa
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2778946
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Seema Khowala <seemaj@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Vedashree Vidwans
2022-09-20 09:36:58 -07:00
committed by mobile promotions
parent f91708325e
commit 170c9552c8
2 changed files with 8 additions and 0 deletions

View File

@@ -128,6 +128,8 @@ static int tegra_hwpm_dma_map_mem_bytes_buffer(struct tegra_soc_hwpm *hwpm,
sg_dma_address(hwpm->mem_mgmt->mem_bytes_sgt->sgl);
#if defined(CONFIG_TEGRA_HWPM_OOT)
hwpm->mem_mgmt->mem_bytes_kernel =
(struct dma_buf_map *) &hwpm->mem_mgmt->mem_bytes_map;
err = dma_buf_vmap(hwpm->mem_mgmt->mem_bytes_dma_buf,
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0)
(struct iosys_map *)hwpm->mem_mgmt->mem_bytes_kernel);