summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2014-01-06 15:30:03 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-05-25 11:15:08 -0300
commitd13f19f2ca7fb6b545915e96ffe19bb405b72037 (patch)
treec69c27e8b953e709f1233418c83e18fdc55e10c9 /drivers/media
parent8271601aca19c1d0ad29d0b65a5a6b9e6ef97bd3 (diff)
downloadop-kernel-dev-d13f19f2ca7fb6b545915e96ffe19bb405b72037.zip
op-kernel-dev-d13f19f2ca7fb6b545915e96ffe19bb405b72037.tar.gz
[media] omap3isp: queue: Inline the ispmmu_v(un)map functions
The ispmmu_vmap() and ispmmu_vunmap() functions are just wrappers around omap_iommu_vmap() and omap_iommu_vunmap(). Inline them. 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')
-rw-r--r--drivers/media/platform/omap3isp/ispqueue.c36
1 files changed, 4 insertions, 32 deletions
diff --git a/drivers/media/platform/omap3isp/ispqueue.c b/drivers/media/platform/omap3isp/ispqueue.c
index a7be7d7..088710b 100644
--- a/drivers/media/platform/omap3isp/ispqueue.c
+++ b/drivers/media/platform/omap3isp/ispqueue.c
@@ -39,36 +39,6 @@
#include "ispvideo.h"
/* -----------------------------------------------------------------------------
- * IOMMU management
- */
-
-#define IOMMU_FLAG (IOVMF_ENDIAN_LITTLE | IOVMF_ELSZ_8)
-
-/*
- * ispmmu_vmap - Wrapper for virtual memory mapping of a scatter gather table
- * @dev: Device pointer specific to the OMAP3 ISP.
- * @sgt: Pointer to source scatter gather table.
- *
- * Returns a resulting mapped device address by the ISP MMU, or -ENOMEM if
- * we ran out of memory.
- */
-static dma_addr_t
-ispmmu_vmap(struct isp_device *isp, const struct sg_table *sgt)
-{
- return omap_iommu_vmap(isp->domain, isp->dev, 0, sgt, IOMMU_FLAG);
-}
-
-/*
- * ispmmu_vunmap - Unmap a device address from the ISP MMU
- * @dev: Device pointer specific to the OMAP3 ISP.
- * @da: Device address generated from a ispmmu_vmap call.
- */
-static void ispmmu_vunmap(struct isp_device *isp, dma_addr_t da)
-{
- omap_iommu_vunmap(isp->domain, isp->dev, (u32)da);
-}
-
-/* -----------------------------------------------------------------------------
* Video buffers management
*/
@@ -227,7 +197,8 @@ static void isp_video_buffer_cleanup(struct isp_video_buffer *buf)
unsigned int i;
if (buf->dma) {
- ispmmu_vunmap(video->isp, buf->dma);
+ omap_iommu_vunmap(video->isp->domain, video->isp->dev,
+ buf->dma);
buf->dma = 0;
}
@@ -521,7 +492,8 @@ static int isp_video_buffer_prepare(struct isp_video_buffer *buf)
}
}
- addr = ispmmu_vmap(video->isp, &buf->sgt);
+ addr = omap_iommu_vmap(video->isp->domain, video->isp->dev, 0,
+ &buf->sgt, IOVMF_ENDIAN_LITTLE | IOVMF_ELSZ_8);
if (IS_ERR_VALUE(addr)) {
ret = -EIO;
goto done;
OpenPOWER on IntegriCloud