summaryrefslogtreecommitdiffstats
path: root/include/linux/nvmap.h
diff options
context:
space:
mode:
authorThomas Fleury <tfleury@nvidia.com>2016-04-04 17:37:20 -0400
committerSri Krishna chowdary <schowdary@nvidia.com>2016-04-14 04:08:17 -0400
commit2c05f5930ab38a891d4432b50f0500a158b9ae49 (patch)
tree6fbee9cf420b22ea5674b842ffe611584710b608 /include/linux/nvmap.h
parent4a76eb4ec96514bdd783b852b2b735aa91c8cb83 (diff)
video: tegra: nvmap: add labels for allocation tags
Defines NVMAP_IOC_SET_TAG_LABEL to assign a human-readeable label to a given allocation tag. Modified debugfs to display this label for handle allocations. bug 1741464 Change-Id: I890a084d271ff7a7da25bd95f515c0131acade7d Signed-off-by: Thomas Fleury <tfleury@nvidia.com> Reviewed-on: http://git-master/r/1120018 GVS: Gerrit_Virtual_Submit Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Diffstat (limited to 'include/linux/nvmap.h')
-rw-r--r--include/linux/nvmap.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/nvmap.h b/include/linux/nvmap.h
index 6bc647493..d551f992d 100644
--- a/include/linux/nvmap.h
+++ b/include/linux/nvmap.h
@@ -280,6 +280,13 @@ struct nvmap_debugfs_handles_entry {
280 __u64 mapped_size; 280 __u64 mapped_size;
281}; 281};
282 282
283struct nvmap_set_tag_label {
284 __u32 tag;
285 __u32 len; /* in: label length
286 out: number of characters copied */
287 __u64 addr; /* in: pointer to label or NULL to remove */
288};
289
283#define NVMAP_IOC_MAGIC 'N' 290#define NVMAP_IOC_MAGIC 'N'
284 291
285/* Creates a new memory handle. On input, the argument is the size of the new 292/* Creates a new memory handle. On input, the argument is the size of the new
@@ -362,6 +369,9 @@ struct nvmap_debugfs_handles_entry {
362 369
363#define NVMAP_IOC_GUP_TEST _IOWR(NVMAP_IOC_MAGIC, 23, struct nvmap_gup_test) 370#define NVMAP_IOC_GUP_TEST _IOWR(NVMAP_IOC_MAGIC, 23, struct nvmap_gup_test)
364 371
372/* Define a label for allocation tag */
373#define NVMAP_IOC_SET_TAG_LABEL _IOW(NVMAP_IOC_MAGIC, 24, struct nvmap_set_tag_label)
374
365/* START of T124 IOCTLS */ 375/* START of T124 IOCTLS */
366/* Actually allocates memory for the specified handle, with kind */ 376/* Actually allocates memory for the specified handle, with kind */
367#define NVMAP_IOC_ALLOC_KIND _IOW(NVMAP_IOC_MAGIC, 100, struct nvmap_alloc_kind_handle) 377#define NVMAP_IOC_ALLOC_KIND _IOW(NVMAP_IOC_MAGIC, 100, struct nvmap_alloc_kind_handle)