diff options
author | Bryan Wu <pengw@nvidia.com> | 2013-07-23 14:00:00 -0700 |
---|---|---|
committer | Ajay Nandakumar <anandakumarm@nvidia.com> | 2013-10-01 16:17:21 +0530 |
commit | ecd8378310cd619c3c6979b1703f217019a34da9 (patch) | |
tree | 1852dda0e21f946d11f433d787eb01eca410a575 /drivers/media/platform/soc_camera | |
parent | aaf1d55562fa67505da0af2ba60f2ffcdbc69e78 (diff) |
media: tegra: use videobuf2-dma-contig.c driver for V4L2
videobuf2-dma-contig.c driver works fine with Tegra V4L2 driver, so
we don't need to use our own nvmap version of that.
This patch convert Tegra V4L2 driver to use videobuf2-dma-contig.c.
Change-Id: I85348d557fe0171cfce02d6b15a9aad254f62f36
Signed-off-by: Bryan Wu <pengw@nvidia.com>
Reviewed-on: http://git-master/r/278535
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
(cherry picked from commit 7b9440482a663444e9befc616e03e3d7d74664ef)
Signed-off-by: Ajay Nandakumar <anandakumarm@nvidia.com>
Diffstat (limited to 'drivers/media/platform/soc_camera')
-rw-r--r-- | drivers/media/platform/soc_camera/Kconfig | 2 | ||||
-rw-r--r-- | drivers/media/platform/soc_camera/tegra_v4l2_camera.c | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/drivers/media/platform/soc_camera/Kconfig b/drivers/media/platform/soc_camera/Kconfig index 1bfc5fca9d3c..74eb64784a77 100644 --- a/drivers/media/platform/soc_camera/Kconfig +++ b/drivers/media/platform/soc_camera/Kconfig @@ -95,6 +95,6 @@ config VIDEO_ATMEL_ISI config VIDEO_TEGRA tristate "Tegra soc_camera host driver" depends on VIDEO_DEV && ARCH_TEGRA && SOC_CAMERA && HAS_DMA && HAVE_CLK - select VIDEOBUF2_DMA_NVMAP + select VIDEOBUF2_DMA_CONTIG ---help--- This is a v4l2 driver for the Tegra camera interface diff --git a/drivers/media/platform/soc_camera/tegra_v4l2_camera.c b/drivers/media/platform/soc_camera/tegra_v4l2_camera.c index 5f046cf095d7..a551af56d889 100644 --- a/drivers/media/platform/soc_camera/tegra_v4l2_camera.c +++ b/drivers/media/platform/soc_camera/tegra_v4l2_camera.c @@ -30,7 +30,7 @@ #include <media/soc_camera.h> #include <media/soc_mediabus.h> -#include <media/videobuf2-dma-nvmap.h> +#include <media/videobuf2-dma-contig.h> #include <media/tegra_v4l2_camera.h> #include "dev.h" @@ -1169,7 +1169,7 @@ static int tegra_camera_init_buffer(struct tegra_buffer *buf) case V4L2_PIX_FMT_YVYU: case V4L2_PIX_FMT_SBGGR8: case V4L2_PIX_FMT_SBGGR10: - buf->buffer_addr = vb2_dma_nvmap_plane_paddr(&buf->vb, 0); + buf->buffer_addr = vb2_dma_contig_plane_dma_addr(&buf->vb, 0); buf->start_addr = buf->buffer_addr; if (pdata->flip_v) @@ -1183,7 +1183,7 @@ static int tegra_camera_init_buffer(struct tegra_buffer *buf) case V4L2_PIX_FMT_YUV420: case V4L2_PIX_FMT_YVU420: - buf->buffer_addr = vb2_dma_nvmap_plane_paddr(&buf->vb, 0); + buf->buffer_addr = vb2_dma_contig_plane_dma_addr(&buf->vb, 0); buf->buffer_addr_u = buf->buffer_addr + icd->user_width * icd->user_height; buf->buffer_addr_v = buf->buffer_addr_u + @@ -1440,7 +1440,7 @@ static int tegra_camera_init_videobuf(struct vb2_queue *q, q->io_modes = VB2_MMAP | VB2_USERPTR; q->drv_priv = icd; q->ops = &tegra_camera_videobuf_ops; - q->mem_ops = &vb2_dma_nvmap_memops; + q->mem_ops = &vb2_dma_contig_memops; q->buf_struct_size = sizeof(struct tegra_buffer); dev_dbg(icd->parent, "Finished tegra_camera_init_videobuf()\n"); @@ -1843,7 +1843,7 @@ static int tegra_camera_probe(struct platform_device *pdev) pm_runtime_set_autosuspend_delay(&pdev->dev, ndata->clockgate_delay); pm_runtime_enable(&pdev->dev); - pcdev->alloc_ctx = vb2_dma_nvmap_init_ctx(&pdev->dev); + pcdev->alloc_ctx = vb2_dma_contig_init_ctx(&pdev->dev); if (IS_ERR(pcdev->alloc_ctx)) { err = PTR_ERR(pcdev->alloc_ctx); goto exit_pm_disable; @@ -1860,7 +1860,7 @@ static int tegra_camera_probe(struct platform_device *pdev) exit_cleanup_alloc_ctx: platform_set_drvdata(pdev, pcdev->ndata); - vb2_dma_nvmap_cleanup_ctx(pcdev->alloc_ctx); + vb2_dma_contig_cleanup_ctx(pcdev->alloc_ctx); exit_pm_disable: pm_runtime_disable(&pdev->dev); exit_put_regulator: @@ -1896,7 +1896,7 @@ static int tegra_camera_remove(struct platform_device *pdev) platform_set_drvdata(pdev, pcdev->ndata); nvhost_client_device_release(pdev); - vb2_dma_nvmap_cleanup_ctx(pcdev->alloc_ctx); + vb2_dma_contig_cleanup_ctx(pcdev->alloc_ctx); pm_runtime_disable(&pdev->dev); |