summaryrefslogtreecommitdiff
path: root/drivers/video/tegra/nvmap/nvmap_handle.c
diff options
context:
space:
mode:
authorRebecca Schultz Zavin <rebecca@android.com>2010-10-26 16:41:40 -0700
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:36:35 -0800
commite795bb28790bab34aeb3346949bd6fddfb746f6e (patch)
treec53aafe8b316b6e5aaab0b2aed77832d599d1ba8 /drivers/video/tegra/nvmap/nvmap_handle.c
parente849e2c1de2e3a2882b6a35c3b658e15b46d7a86 (diff)
video: tegra: nvmap: Track carveout clients
This patch adds the ability to track the total allocations in a given carveout heap by client. It also adds a sys file to print the list of clients, their pids and their respective carveout sizes Change-Id: I34fc97c3be574d2bd30d7594320ff05f6e13c476 Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
Diffstat (limited to 'drivers/video/tegra/nvmap/nvmap_handle.c')
-rw-r--r--drivers/video/tegra/nvmap/nvmap_handle.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/video/tegra/nvmap/nvmap_handle.c b/drivers/video/tegra/nvmap/nvmap_handle.c
index 2f50c0a1b8d3..be130b4be757 100644
--- a/drivers/video/tegra/nvmap/nvmap_handle.c
+++ b/drivers/video/tegra/nvmap/nvmap_handle.c
@@ -81,6 +81,9 @@ void _nvmap_handle_free(struct nvmap_handle *h)
goto out;
if (!h->heap_pgalloc) {
+ nvmap_carveout_commit_subtract(client,
+ nvmap_heap_to_arg(nvmap_block_to_heap(h->carveout)),
+ h->size);
nvmap_heap_free(h->carveout);
goto out;
}