summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2011-11-22 09:46:52 +0200
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:50:23 -0800
commited6dc2c9ecf207abb94ba041aede0434281af1e2 (patch)
treef2b5b91bb5827961abf34bb90b8ff5ff8c7d986a
parentfed6eda22f2311cc70569ce7ef7c5d4120c6f516 (diff)
video: tegra: nvmap: Expose nvmap_handle_ref
Debug output of nvhost needs nvmap_handle_ref. This patch exposes it as part of the public API. Change-Id: I8d12083cb9ac43291c457d6a262029d00e106c9a Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/66071 Tested-by: Gerrit_Virtual_Submit Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com> Rebase-Id: Rbe38a80af896cdb59e37efdfadd520405790886c
-rw-r--r--arch/arm/mach-tegra/include/mach/nvmap.h13
-rw-r--r--drivers/video/tegra/nvmap/nvmap.h11
2 files changed, 12 insertions, 12 deletions
diff --git a/arch/arm/mach-tegra/include/mach/nvmap.h b/arch/arm/mach-tegra/include/mach/nvmap.h
index 0e813bcd7562..ad23caa45cfb 100644
--- a/arch/arm/mach-tegra/include/mach/nvmap.h
+++ b/arch/arm/mach-tegra/include/mach/nvmap.h
@@ -22,6 +22,7 @@
#include <linux/ioctl.h>
#include <linux/file.h>
+#include <linux/rbtree.h>
#if !defined(__KERNEL__)
#define __user
@@ -52,7 +53,6 @@
#if defined(__KERNEL__)
-struct nvmap_handle_ref;
struct nvmap_handle;
struct nvmap_client;
struct nvmap_device;
@@ -67,6 +67,17 @@ struct nvmap_pinarray_elem {
__u32 pin_offset;
};
+/* handle_ref objects are client-local references to an nvmap_handle;
+ * they are distinct objects so that handles can be unpinned and
+ * unreferenced the correct number of times when a client abnormally
+ * terminates */
+struct nvmap_handle_ref {
+ struct nvmap_handle *handle;
+ struct rb_node node;
+ atomic_t dupes; /* number of times to free on file close */
+ atomic_t pin; /* number of times to unpin on free */
+};
+
struct nvmap_client *nvmap_create_client(struct nvmap_device *dev,
const char *name);
diff --git a/drivers/video/tegra/nvmap/nvmap.h b/drivers/video/tegra/nvmap/nvmap.h
index 037814d2e756..2670ff99c828 100644
--- a/drivers/video/tegra/nvmap/nvmap.h
+++ b/drivers/video/tegra/nvmap/nvmap.h
@@ -119,17 +119,6 @@ struct nvmap_client {
struct nvmap_carveout_commit carveout_commit[0];
};
-/* handle_ref objects are client-local references to an nvmap_handle;
- * they are distinct objects so that handles can be unpinned and
- * unreferenced the correct number of times when a client abnormally
- * terminates */
-struct nvmap_handle_ref {
- struct nvmap_handle *handle;
- struct rb_node node;
- atomic_t dupes; /* number of times to free on file close */
- atomic_t pin; /* number of times to unpin on free */
-};
-
struct nvmap_vma_priv {
struct nvmap_handle *handle;
size_t offs;