From 66d34be2111cbce34f5b50ff6d353481caf82c3c Mon Sep 17 00:00:00 2001 From: puneet saxena Date: Mon, 29 Jun 2020 20:00:37 +0530 Subject: drivers: tegra: nvmap: Add NVMAP_IOC_PARAMETERS ioctl Add NVMAP_IOC_PARAMETERS to return nvmap handle's contig; Phys_Contig import_id; NA handle; heap_number; Only valid for IVM carveout access_flags; NA heap; Heap Type align; Alignement coherency; Coherency flag size; Handle Size Bug 3038325 Change-Id: I6fcfce7c3808e21084b543fa87ff8e48431b19f5 Signed-off-by: puneet saxena Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2368252 Reviewed-by: automaticguardword Reviewed-by: Kai Zhang (SW-TEGRA) Reviewed-by: Tuomas Kulve Reviewed-by: Bibek Basu Reviewed-by: mobile promotions Tested-by: mobile promotions GVS: Gerrit_Virtual_Submit --- include/uapi/linux/nvmap.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'include/uapi/linux/nvmap.h') diff --git a/include/uapi/linux/nvmap.h b/include/uapi/linux/nvmap.h index 667dcdc8e..66eda75ce 100644 --- a/include/uapi/linux/nvmap.h +++ b/include/uapi/linux/nvmap.h @@ -3,7 +3,7 @@ * * structure declarations for nvmem and nvmap user-space ioctls * - * Copyright (c) 2009-2019, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2009-2020, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -275,6 +275,18 @@ struct nvmap_query_heap_params { __u64 largest_free_block; }; +struct nvmap_handle_parameters { + __u8 contig; + __u32 import_id; + __u32 handle; + __u32 heap_number; + __u32 access_flags; + __u64 heap; + __u64 align; + __u64 coherency; + __u64 size; +}; + #define NVMAP_IOC_MAGIC 'N' /* Creates a new memory handle. On input, the argument is the size of the new @@ -373,6 +385,8 @@ struct nvmap_query_heap_params { #define NVMAP_IOC_GET_HEAP_SIZE \ _IOR(NVMAP_IOC_MAGIC, 26, struct nvmap_heap_size) +#define NVMAP_IOC_PARAMETERS \ + _IOR(NVMAP_IOC_MAGIC, 27, struct nvmap_handle_parameters) /* 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