summaryrefslogtreecommitdiff
path: root/drivers/media/video
diff options
context:
space:
mode:
authorVikram Fugro <vfugro@nvidia.com>2013-10-30 13:40:20 +0530
committerMatthew Pedro <mapedro@nvidia.com>2013-11-18 14:15:39 -0800
commit2fb9cd0d92979598e3aa5319babdbe6be4c6df22 (patch)
tree7a7e9e46d6c75b25ca859eef43e8dc60e2d52c4c /drivers/media/video
parent2cfae82f4f11691c291c85f9d4ff2ec73ea74e57 (diff)
media: nvmap: Few tweaks in nvmap
The tweaks are only specific to r16-r2 branch and will not go into mainline. - Pass nvmap memory handle to the user through the mmap'd buffer allocated by videobuf2 client. - Allow the "user" nvmap client to access the nvmap memory handle of "videobuf2-dma-nvmap" client. Re-arranging the copyright message in nvmap_dev.c for Automatic validation to pass. Bug 1369083 Change-Id: Ia27d172253860e79557911c2e848bc9084d662d4 Signed-off-by: Vikram Fugro <vfugro@nvidia.com> Reviewed-on: http://git-master/r/309494 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Krishna Reddy <vdumpa@nvidia.com> Reviewed-by: Kaustubh Purandare <kpurandare@nvidia.com> Reviewed-by: Winnie Hsu <whsu@nvidia.com> Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Diffstat (limited to 'drivers/media/video')
-rw-r--r--drivers/media/video/videobuf2-dma-nvmap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/video/videobuf2-dma-nvmap.c b/drivers/media/video/videobuf2-dma-nvmap.c
index 5ab3c62ac05b..4ba8fed0cc02 100644
--- a/drivers/media/video/videobuf2-dma-nvmap.c
+++ b/drivers/media/video/videobuf2-dma-nvmap.c
@@ -82,6 +82,8 @@ static void *vb2_dma_nvmap_alloc(void *alloc_ctx, unsigned long size)
buf->handler.put = vb2_dma_nvmap_put;
buf->handler.arg = buf;
+ *((unsigned long *)buf->vaddr) = (unsigned long)buf->nvmap_ref->handle;
+
atomic_inc(&buf->refcount);
return buf;