summaryrefslogtreecommitdiff
path: root/drivers/video/tegra/nvmap/nvmap.c
diff options
context:
space:
mode:
authorKrishna Reddy <vdumpa@nvidia.com>2012-03-15 19:14:53 -0700
committerVarun Wadekar <vwadekar@nvidia.com>2012-04-11 11:23:07 +0530
commitff00adc41efebc3c8889c9a4bb5ab919d64b44b1 (patch)
tree8e391f1955e9e1e48d04693cbcd0aa42677e185b /drivers/video/tegra/nvmap/nvmap.c
parentb2594ff4acf227689ef2fc48f56b69a610ff767b (diff)
arm: tegra: nvmap: Update nvmap_alloc api.
Update nvmap_alloc api to take heap_mask as arg. This is to let clients specify the specific heap needed. Change-Id: I9950b3e60e6dac0301b6dc66be3e9d0bab8e0fee Signed-off-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-on: http://git-master/r/90471 Reviewed-by: Scott Williams <scwilliams@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User
Diffstat (limited to 'drivers/video/tegra/nvmap/nvmap.c')
-rw-r--r--drivers/video/tegra/nvmap/nvmap.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/video/tegra/nvmap/nvmap.c b/drivers/video/tegra/nvmap/nvmap.c
index de6907f86b71..bbff3664e079 100644
--- a/drivers/video/tegra/nvmap/nvmap.c
+++ b/drivers/video/tegra/nvmap/nvmap.c
@@ -740,19 +740,23 @@ void nvmap_munmap(struct nvmap_handle_ref *ref, void *addr)
}
struct nvmap_handle_ref *nvmap_alloc(struct nvmap_client *client, size_t size,
- size_t align, unsigned int flags)
+ size_t align, unsigned int flags,
+ unsigned int heap_mask)
{
const unsigned int default_heap = (NVMAP_HEAP_SYSMEM |
NVMAP_HEAP_CARVEOUT_GENERIC);
struct nvmap_handle_ref *r = NULL;
int err;
+ if (heap_mask == 0)
+ heap_mask = default_heap;
+
r = nvmap_create_handle(client, size);
if (IS_ERR(r))
return r;
err = nvmap_alloc_handle_id(client, nvmap_ref_to_id(r),
- default_heap, align, flags);
+ heap_mask, align, flags);
if (err) {
nvmap_free_handle_id(client, nvmap_ref_to_id(r));