From 2c05f5930ab38a891d4432b50f0500a158b9ae49 Mon Sep 17 00:00:00 2001 From: Thomas Fleury Date: Mon, 4 Apr 2016 14:37:20 -0700 Subject: 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 Reviewed-on: http://git-master/r/1120018 GVS: Gerrit_Virtual_Submit Reviewed-by: Krishna Reddy --- 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 6bc647493..d551f992d 100644 --- a/include/linux/nvmap.h +++ b/include/linux/nvmap.h @@ -280,6 +280,13 @@ struct nvmap_debugfs_handles_entry { __u64 mapped_size; }; +struct nvmap_set_tag_label { + __u32 tag; + __u32 len; /* in: label length + out: number of characters copied */ + __u64 addr; /* in: pointer to label or NULL to remove */ +}; + #define NVMAP_IOC_MAGIC 'N' /* Creates a new memory handle. On input, the argument is the size of the new @@ -362,6 +369,9 @@ struct nvmap_debugfs_handles_entry { #define NVMAP_IOC_GUP_TEST _IOWR(NVMAP_IOC_MAGIC, 23, struct nvmap_gup_test) +/* Define a label for allocation tag */ +#define NVMAP_IOC_SET_TAG_LABEL _IOW(NVMAP_IOC_MAGIC, 24, struct nvmap_set_tag_label) + /* 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