summaryrefslogtreecommitdiffstats
path: root/include/uapi/linux
diff options
context:
space:
mode:
authorPuneet Saxena <puneets@nvidia.com>2019-10-01 13:10:48 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2019-12-12 18:09:32 -0500
commitc9d1a165ed2470e8988cff8284b055bacacb620f (patch)
treed15b8a10a4d312d7e3828c9280c2f00e82c195e7 /include/uapi/linux
parent30c0d8332a9a36f88c4ba809b94cf5b0669e9b55 (diff)
video: tegra: nvmap: add NvRmMemQueryHeapParams
Add NvRmMemQueryHeapParams to return Heap params such as total size, free size.. Bug 200555794 Bug 200565027 Bug 200564460 Change-Id: I7e002a3264ffe2df8c95a037f157482dbd78bbff Signed-off-by: Puneet Saxena <puneets@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/2209555 (cherry picked from commit e5039360df4e5695fb388f7302b8d8670094190d) Reviewed-on: https://git-master.nvidia.com/r/2232110 Reviewed-by: Sandipan Patra <spatra@nvidia.com> Reviewed-by: Sachin Nikam <snikam@nvidia.com> Tested-by: Sandipan Patra <spatra@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'include/uapi/linux')
-rw-r--r--include/uapi/linux/nvmap.h18
1 files changed, 17 insertions, 1 deletions
diff --git a/include/uapi/linux/nvmap.h b/include/uapi/linux/nvmap.h
index 2b2d12a60..667dcdc8e 100644
--- a/include/uapi/linux/nvmap.h
+++ b/include/uapi/linux/nvmap.h
@@ -263,6 +263,18 @@ struct nvmap_heap_size {
263 __u64 size; 263 __u64 size;
264}; 264};
265 265
266/**
267 * Struct used while querying heap parameters
268 */
269struct nvmap_query_heap_params {
270 __u32 heap_mask;
271 __u32 flags;
272 __u8 contig;
273 __u64 total;
274 __u64 free;
275 __u64 largest_free_block;
276};
277
266#define NVMAP_IOC_MAGIC 'N' 278#define NVMAP_IOC_MAGIC 'N'
267 279
268/* Creates a new memory handle. On input, the argument is the size of the new 280/* Creates a new memory handle. On input, the argument is the size of the new
@@ -371,6 +383,10 @@ struct nvmap_heap_size {
371/* Allocate seperate memory for VPR */ 383/* Allocate seperate memory for VPR */
372#define NVMAP_IOC_VPR_FLOOR_SIZE _IOW(NVMAP_IOC_MAGIC, 102, __u32) 384#define NVMAP_IOC_VPR_FLOOR_SIZE _IOW(NVMAP_IOC_MAGIC, 102, __u32)
373 385
374#define NVMAP_IOC_MAXNR (_IOC_NR(NVMAP_IOC_VPR_FLOOR_SIZE)) 386/* Get heap parameters such as total and frre size */
387#define NVMAP_IOC_QUERY_HEAP_PARAMS _IOR(NVMAP_IOC_MAGIC, 105, \
388 struct nvmap_query_heap_params)
389
390#define NVMAP_IOC_MAXNR (_IOC_NR(NVMAP_IOC_QUERY_HEAP_PARAMS))
375 391
376#endif /* __UAPI_LINUX_NVMAP_H */ 392#endif /* __UAPI_LINUX_NVMAP_H */