video: tegra: nvmap: Add NUMA aware query heap API

Add a new API to query the heap params for an input heap present on the
given input numa node. e.g. User may specify to query heap information
of GPU carveout on numa node 0 or numa node 1 etc.

Bug 4231517

Change-Id: I9622828b6a28984564b4c7f17b88b4d38bbd4684
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3010795
Reviewed-by: Pritesh Raithatha <praithatha@nvidia.com>
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Ketan Patil
2023-11-06 07:21:17 +00:00
committed by mobile promotions
parent 3d11a320cc
commit 343f9e764f
4 changed files with 34 additions and 5 deletions

View File

@@ -241,6 +241,7 @@ struct nvmap_query_heap_params {
__u64 free;
__u64 largest_free_block;
__u32 granule_size;
__s32 numa_id;
};
/**
@@ -369,6 +370,10 @@ struct nvmap_fd_for_range_from_list {
#define NVMAP_IOC_GET_FD_FOR_RANGE_FROM_LIST _IOR(NVMAP_IOC_MAGIC, 107, \
struct nvmap_fd_for_range_from_list)
#define NVMAP_IOC_MAXNR (_IOC_NR(NVMAP_IOC_GET_FD_FOR_RANGE_FROM_LIST))
/* NUMA aware query heap params */
#define NVMAP_IOC_QUERY_HEAP_PARAMS_NUMA _IOR(NVMAP_IOC_MAGIC, 108, \
struct nvmap_query_heap_params)
#define NVMAP_IOC_MAXNR (_IOC_NR(NVMAP_IOC_QUERY_HEAP_PARAMS_NUMA))
#endif /* __UAPI_LINUX_NVMAP_H */