summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/omap3isp/ispqueue.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2014-03-07 21:29:31 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-05-25 11:19:08 -0300
commit1e345d4ab4a873a0c96ecbdfdd2f9a36998bba6f (patch)
treec771c7d67dab6be773fbbf7ebac78dbd289e9a46 /drivers/media/platform/omap3isp/ispqueue.c
parent2a0a5472af5caa0d0df334abb9975dc496f045da (diff)
downloadop-kernel-dev-1e345d4ab4a873a0c96ecbdfdd2f9a36998bba6f.zip
op-kernel-dev-1e345d4ab4a873a0c96ecbdfdd2f9a36998bba6f.tar.gz
[media] omap3isp: queue: Don't build scatterlist for kernel buffer
The scatterlist is not needed for those buffers, don't build it. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/platform/omap3isp/ispqueue.c')
-rw-r--r--drivers/media/platform/omap3isp/ispqueue.c24
1 files changed, 3 insertions, 21 deletions
diff --git a/drivers/media/platform/omap3isp/ispqueue.c b/drivers/media/platform/omap3isp/ispqueue.c
index 9c90fb0..515ed94 100644
--- a/drivers/media/platform/omap3isp/ispqueue.c
+++ b/drivers/media/platform/omap3isp/ispqueue.c
@@ -147,21 +147,6 @@ out:
}
/*
- * isp_video_buffer_prepare_kernel - Build scatter list for a kernel-allocated
- * buffer
- *
- * Retrieve the sgtable using the DMA API.
- */
-static int isp_video_buffer_prepare_kernel(struct isp_video_buffer *buf)
-{
- struct isp_video_fh *vfh = isp_video_queue_to_isp_video_fh(buf->queue);
- struct isp_video *video = vfh->video;
-
- return dma_get_sgtable(video->isp->dev, &buf->sgt, buf->vaddr,
- buf->dma, PAGE_ALIGN(buf->vbuf.length));
-}
-
-/*
* isp_video_buffer_cleanup - Release pages for a userspace VMA.
*
* Release pages locked by a call isp_video_buffer_prepare_user and free the
@@ -181,10 +166,9 @@ static void isp_video_buffer_cleanup(struct isp_video_buffer *buf)
? DMA_FROM_DEVICE : DMA_TO_DEVICE;
dma_unmap_sg_attrs(buf->queue->dev, buf->sgt.sgl,
buf->sgt.orig_nents, direction, &attrs);
+ sg_free_table(&buf->sgt);
}
- sg_free_table(&buf->sgt);
-
if (buf->pages != NULL) {
isp_video_buffer_lock_vma(buf, 0);
@@ -400,7 +384,7 @@ done:
*
* - validating VMAs (userspace buffers only)
* - locking pages and VMAs into memory (userspace buffers only)
- * - building page and scatter-gather lists
+ * - building page and scatter-gather lists (userspace buffers only)
* - mapping buffers for DMA operation
* - performing driver-specific preparation
*
@@ -416,9 +400,7 @@ static int isp_video_buffer_prepare(struct isp_video_buffer *buf)
switch (buf->vbuf.memory) {
case V4L2_MEMORY_MMAP:
- ret = isp_video_buffer_prepare_kernel(buf);
- if (ret < 0)
- goto done;
+ ret = 0;
break;
case V4L2_MEMORY_USERPTR:
OpenPOWER on IntegriCloud