summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAndrew Chew <achew@nvidia.com>2012-08-20 13:02:04 -0700
committerWinnie Hsu <whsu@nvidia.com>2012-12-17 11:30:58 -0800
commit62c2aed60372c97eebda02e8833c15b418a16fb0 (patch)
tree208b9f91d8b4a6a0fdf4d3599b821a83d1361c8b /include
parent792af1fd4fd216852b51266ccdef8f770648e922 (diff)
media: tegra: Tegra videobuf2
This is based off of videobuf2-dma-contig, except we use Tegra's nvmap for the buffer allocations. Signed-off-by: Andrew Chew <achew@nvidia.com> Change-Id: I15e689c33ee7b4fc0aade794c78701c82483df3f Reviewed-on: http://git-master/r/145345 (cherry picked from commit 70a4f20fbdd6c2c719400d6c59ef58d845657031) Signed-off-by: Bryan Wu <pengw@nvidia.com> Change-Id: Ia0632d7fcb28415e33fbb22c48f29117d7436f1d Reviewed-on: http://git-master/r/170824 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Andrew Chew <achew@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Winnie Hsu <whsu@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r--include/media/videobuf2-dma-nvmap.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/include/media/videobuf2-dma-nvmap.h b/include/media/videobuf2-dma-nvmap.h
new file mode 100644
index 000000000000..39ae3d3a1d5d
--- /dev/null
+++ b/include/media/videobuf2-dma-nvmap.h
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef _MEDIA_VIDEOBUF2_DMA_NVMAP_H
+#define _MEDIA_VIDEOBUF2_DMA_NVMAP_H
+
+#include <media/videobuf2-core.h>
+#include <linux/dma-mapping.h>
+
+static inline dma_addr_t
+vb2_dma_nvmap_plane_paddr(struct vb2_buffer *vb, unsigned int plane_no)
+{
+ dma_addr_t *paddr = vb2_plane_cookie(vb, plane_no);
+
+ return *paddr;
+}
+
+void *vb2_dma_nvmap_init_ctx(struct device *dev);
+void vb2_dma_nvmap_cleanup_ctx(void *alloc_ctx);
+
+extern const struct vb2_mem_ops vb2_dma_nvmap_memops;
+
+#endif