diff options
Diffstat (limited to 'drivers/video/tegra/nvmap')
-rw-r--r-- | drivers/video/tegra/nvmap/nvmap.h | 1 | ||||
-rw-r--r-- | drivers/video/tegra/nvmap/nvmap_dev.c | 12 | ||||
-rw-r--r-- | drivers/video/tegra/nvmap/nvmap_handle.c | 1 |
3 files changed, 8 insertions, 6 deletions
diff --git a/drivers/video/tegra/nvmap/nvmap.h b/drivers/video/tegra/nvmap/nvmap.h index d8e66567aa5d..037814d2e756 100644 --- a/drivers/video/tegra/nvmap/nvmap.h +++ b/drivers/video/tegra/nvmap/nvmap.h @@ -84,6 +84,7 @@ struct nvmap_handle { bool secure; /* zap IOVMM area on unpin */ bool heap_pgalloc; /* handle is page allocated (sysmem / iovmm) */ bool alloc; /* handle has memory allocated */ + unsigned int userflags; /* flags passed from userspace */ struct mutex lock; }; diff --git a/drivers/video/tegra/nvmap/nvmap_dev.c b/drivers/video/tegra/nvmap/nvmap_dev.c index c3a5f7f0de36..a5b6e9e5ba77 100644 --- a/drivers/video/tegra/nvmap/nvmap_dev.c +++ b/drivers/video/tegra/nvmap/nvmap_dev.c @@ -983,12 +983,12 @@ static void allocations_stringify(struct nvmap_client *client, rb_entry(n, struct nvmap_handle_ref, node); struct nvmap_handle *handle = ref->handle; if (handle->alloc && !handle->heap_pgalloc) { - seq_printf(s, "%-18s %-18s %8lx %10u\n", "", "", + seq_printf(s, "%-18s %-18s %8lx %10u %8lx\n", "", "", (unsigned long)(handle->carveout->base), - handle->size); + handle->size, handle->userflags); } else if (handle->alloc && handle->heap_pgalloc) { - seq_printf(s, "%-18s %-18s %8lx %10u\n", "", "", - base, handle->size); + seq_printf(s, "%-18s %-18s %8lx %10u %8lx\n", "", "", + base, handle->size, handle->userflags); } } } @@ -1001,8 +1001,8 @@ static int nvmap_debug_allocations_show(struct seq_file *s, void *unused) unsigned int total = 0; spin_lock_irqsave(&node->clients_lock, flags); - seq_printf(s, "%-18s %18s %8s %10s\n", "CLIENT", "PROCESS", "PID", - "SIZE"); + seq_printf(s, "%-18s %18s %8s %10s %8s\n", "CLIENT", "PROCESS", "PID", + "SIZE", "FLAGS"); seq_printf(s, "%-18s %18s %8s %10s\n", "", "", "BASE", "SIZE"); list_for_each_entry(commit, &node->clients, list) { diff --git a/drivers/video/tegra/nvmap/nvmap_handle.c b/drivers/video/tegra/nvmap/nvmap_handle.c index a1c5b956efc9..4a0709c55581 100644 --- a/drivers/video/tegra/nvmap/nvmap_handle.c +++ b/drivers/video/tegra/nvmap/nvmap_handle.c @@ -344,6 +344,7 @@ int nvmap_alloc_handle_id(struct nvmap_client *client, if (h->alloc) goto out; + h->userflags = flags; nr_page = ((h->size + PAGE_SIZE - 1) >> PAGE_SHIFT); h->secure = !!(flags & NVMAP_HANDLE_SECURE); h->flags = (flags & NVMAP_HANDLE_CACHE_FLAG); |