diff options
-rw-r--r-- | drivers/video/tegra/nvmap/nvmap.c | 13 | ||||
-rw-r--r-- | include/linux/nvmap.h | 2 |
2 files changed, 15 insertions, 0 deletions
diff --git a/drivers/video/tegra/nvmap/nvmap.c b/drivers/video/tegra/nvmap/nvmap.c index a0dcf26337f8..19b821d41284 100644 --- a/drivers/video/tegra/nvmap/nvmap.c +++ b/drivers/video/tegra/nvmap/nvmap.c @@ -605,3 +605,16 @@ void nvmap_free(struct nvmap_client *client, struct nvmap_handle_ref *r) nvmap_free_handle_id(client, nvmap_ref_to_id(r)); } + +int nvmap_mark_global(struct nvmap_client *client, struct nvmap_handle_ref *r) +{ + struct nvmap_handle *h; + + h = nvmap_get_handle_id(client, (unsigned long)r->handle); + if (!h) + return -EINVAL; + r->handle->global = true; + nvmap_handle_put(h); + + return 0; +} diff --git a/include/linux/nvmap.h b/include/linux/nvmap.h index 692956b2fc4f..9cc978ec5a7f 100644 --- a/include/linux/nvmap.h +++ b/include/linux/nvmap.h @@ -124,6 +124,8 @@ void nvmap_unpin_handles(struct nvmap_client *client, struct nvmap_handle_ref *nvmap_duplicate_handle_id(struct nvmap_client *client, unsigned long id); +int nvmap_mark_global(struct nvmap_client *client, struct nvmap_handle_ref *r); + struct nvmap_platform_carveout { const char *name; unsigned int usage_mask; |