mirror of
git://nv-tegra.nvidia.com/linux-hwpm.git
synced 2025-12-22 17:30:40 +03:00
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:
committed by
mobile promotions
parent
f91708325e
commit
170c9552c8
@@ -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);
|
||||
|
||||
@@ -15,6 +15,9 @@
|
||||
#define TEGRA_HWPM_OS_LINUX_MEM_MGMT_UTILS_H
|
||||
|
||||
#include <linux/types.h>
|
||||
#if defined(CONFIG_TEGRA_HWPM_OOT)
|
||||
#include <linux/dma-buf-map.h>
|
||||
#endif
|
||||
|
||||
/* This macro is copy of TEGRA_SOC_HWPM_MEM_BYTES_INVALID */
|
||||
#define TEGRA_HWPM_MEM_BYTES_INVALID 0xffffffff
|
||||
@@ -38,6 +41,9 @@ struct tegra_hwpm_mem_mgmt {
|
||||
struct dma_buf_attachment *mem_bytes_attach;
|
||||
u64 mem_bytes_buf_va;
|
||||
void *mem_bytes_kernel;
|
||||
#if defined(CONFIG_TEGRA_HWPM_OOT)
|
||||
struct dma_buf_map mem_bytes_map;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct tegra_hwpm_allowlist_map {
|
||||
|
||||
Reference in New Issue
Block a user