video: tegra: host: set memmgr type to nvmap
Krishna Reddy [Wed, 25 Sep 2013 18:36:15 +0000 (11:36 -0700)]
set memmgr type to nvmap if CONFIG_NVMAP_USE_FD_FOR_HANDLE is
enabled.

Change-Id: Ib9ae9bc855f7e6b98303a4082c68717d97b97a92
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/278989
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
(cherry picked from commit 567f03ca9f0f1de8a242dea22c042e2a2587c6fa)
Signed-off-by: Ajay Nandakumar <anandakumarm@nvidia.com>

drivers/video/tegra/host/nvhost_memmgr.h

index 8843ff8..d578bce 100644 (file)
@@ -62,8 +62,13 @@ enum mem_mgr_type {
        mem_mgr_type_dmabuf = 1,
 };
 
+#ifdef CONFIG_NVMAP_USE_FD_FOR_HANDLE
+#define MEMMGR_TYPE_MASK       0x0
+#else
 #define MEMMGR_TYPE_MASK       0x3
-#define MEMMGR_ID_MASK         ~0x3
+#endif
+#define MEMMGR_ID_MASK         (~MEMMGR_TYPE_MASK)
+
 
 int nvhost_memmgr_init(struct nvhost_chip_support *chip);
 struct mem_mgr *nvhost_memmgr_alloc_mgr(void);