summaryrefslogtreecommitdiff
path: root/drivers/video/tegra
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/tegra')
-rw-r--r--drivers/video/tegra/nvmap/nvmap_dev.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/video/tegra/nvmap/nvmap_dev.c b/drivers/video/tegra/nvmap/nvmap_dev.c
index 0c12348db88e..3b0db14f16ca 100644
--- a/drivers/video/tegra/nvmap/nvmap_dev.c
+++ b/drivers/video/tegra/nvmap/nvmap_dev.c
@@ -1,10 +1,10 @@
/*
+ * Copyright (c) 2011-2013, NVIDIA CORPORATION. All rights reserved.
+ *
* drivers/video/tegra/nvmap/nvmap_dev.c
*
* User-space interface to nvmap
*
- * Copyright (c) 2011-2012, NVIDIA Corporation.
- *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
@@ -231,6 +231,14 @@ struct nvmap_handle *nvmap_get_handle_id(struct nvmap_client *client,
struct nvmap_handle_ref *ref;
struct nvmap_handle *h = NULL;
+ /* Allow the handle to be accessed by other (non-owner)
+ clients only if the owner is "videobuf2-dma-nvmap",
+ which is a V4L2 capture kernel module. This handle can
+ be accessed by the "user" client for rendering */
+ if (!strcmp(((struct nvmap_handle *)id)->owner->name,
+ "videobuf2-dma-nvmap"))
+ client = ((struct nvmap_handle *)id)->owner;
+
nvmap_ref_lock(client);
ref = _nvmap_validate_id_locked(client, id);
if (ref)