From 36219a07f938c97fd8f4aec8386502efdca6a402 Mon Sep 17 00:00:00 2001 From: Krishna Reddy Date: Wed, 30 Mar 2016 22:10:39 -0700 Subject: video: tegra: nvmap: support creating NvMap handle from VA Support creation of NvMap handle from VA. Bug 1749713 Change-Id: I40d6aee04d343f2076f6231ba810cac77a7f9f46 Signed-off-by: Krishna Reddy Reviewed-on: http://git-master/r/1118110 Reviewed-by: Sri Krishna Chowdary --- include/linux/nvmap.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/linux/nvmap.h') diff --git a/include/linux/nvmap.h b/include/linux/nvmap.h index 06c8c1709..90358a6ad 100644 --- a/include/linux/nvmap.h +++ b/include/linux/nvmap.h @@ -135,6 +135,13 @@ struct nvmap_create_handle { __u32 handle; /* returns nvmap handle */ }; +struct nvmap_create_handle_from_va { + __u64 va; /* FromVA*/ + __u32 size; /* non-zero for partial memory VMA. zero for end of VMA */ + __u32 flags; /* wb/wc/uc/iwb, tag etc. */ + __u32 handle; /* returns nvmap handle */ +}; + struct nvmap_alloc_handle { __u32 handle; /* nvmap handle */ __u32 heap_mask; /* heaps to allocate from */ @@ -344,6 +351,9 @@ struct nvmap_debugfs_handles_entry { #define NVMAP_IOC_GET_IVC_ID _IOWR(NVMAP_IOC_MAGIC, 20, struct nvmap_create_handle) #define NVMAP_IOC_GET_IVM_HEAPS _IOR(NVMAP_IOC_MAGIC, 21, unsigned int) +/* Create a new memory handle from VA passed */ +#define NVMAP_IOC_FROM_VA _IOWR(NVMAP_IOC_MAGIC, 22, struct nvmap_create_handle_from_va) + /* START of T124 IOCTLS */ /* Actually allocates memory for the specified handle, with kind */ #define NVMAP_IOC_ALLOC_KIND _IOW(NVMAP_IOC_MAGIC, 100, struct nvmap_alloc_kind_handle) -- cgit v1.2.2