diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2014-01-06 13:30:03 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-05-25 10:15:08 -0400 |
commit | d13f19f2ca7fb6b545915e96ffe19bb405b72037 (patch) | |
tree | c69c27e8b953e709f1233418c83e18fdc55e10c9 /drivers/media | |
parent | 8271601aca19c1d0ad29d0b65a5a6b9e6ef97bd3 (diff) |
[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.c | 36 |
1 files changed, 4 insertions, 32 deletions
diff --git a/drivers/media/platform/omap3isp/ispqueue.c b/drivers/media/platform/omap3isp/ispqueue.c index a7be7d7d5db5..088710b2a5ea 100644 --- a/drivers/media/platform/omap3isp/ispqueue.c +++ b/drivers/media/platform/omap3isp/ispqueue.c | |||
@@ -39,36 +39,6 @@ | |||
39 | #include "ispvideo.h" | 39 | #include "ispvideo.h" |
40 | 40 | ||
41 | /* ----------------------------------------------------------------------------- | 41 | /* ----------------------------------------------------------------------------- |
42 | * IOMMU management | ||
43 | */ | ||
44 | |||
45 | #define IOMMU_FLAG (IOVMF_ENDIAN_LITTLE | IOVMF_ELSZ_8) | ||
46 | |||
47 | /* | ||
48 | * ispmmu_vmap - Wrapper for virtual memory mapping of a scatter gather table | ||
49 | * @dev: Device pointer specific to the OMAP3 ISP. | ||
50 | * @sgt: Pointer to source scatter gather table. | ||
51 | * | ||
52 | * Returns a resulting mapped device address by the ISP MMU, or -ENOMEM if | ||
53 | * we ran out of memory. | ||
54 | */ | ||
55 | static dma_addr_t | ||
56 | ispmmu_vmap(struct isp_device *isp, const struct sg_table *sgt) | ||
57 | { | ||
58 | return omap_iommu_vmap(isp->domain, isp->dev, 0, sgt, IOMMU_FLAG); | ||
59 | } | ||
60 | |||
61 | /* | ||
62 | * ispmmu_vunmap - Unmap a device address from the ISP MMU | ||
63 | * @dev: Device pointer specific to the OMAP3 ISP. | ||
64 | * @da: Device address generated from a ispmmu_vmap call. | ||
65 | */ | ||
66 | static void ispmmu_vunmap(struct isp_device *isp, dma_addr_t da) | ||
67 | { | ||
68 | omap_iommu_vunmap(isp->domain, isp->dev, (u32)da); | ||
69 | } | ||
70 | |||
71 | /* ----------------------------------------------------------------------------- | ||
72 | * Video buffers management | 42 | * Video buffers management |
73 | */ | 43 | */ |
74 | 44 | ||
@@ -227,7 +197,8 @@ static void isp_video_buffer_cleanup(struct isp_video_buffer *buf) | |||
227 | unsigned int i; | 197 | unsigned int i; |
228 | 198 | ||
229 | if (buf->dma) { | 199 | if (buf->dma) { |
230 | ispmmu_vunmap(video->isp, buf->dma); | 200 | omap_iommu_vunmap(video->isp->domain, video->isp->dev, |
201 | buf->dma); | ||
231 | buf->dma = 0; | 202 | buf->dma = 0; |
232 | } | 203 | } |
233 | 204 | ||
@@ -521,7 +492,8 @@ static int isp_video_buffer_prepare(struct isp_video_buffer *buf) | |||
521 | } | 492 | } |
522 | } | 493 | } |
523 | 494 | ||
524 | addr = ispmmu_vmap(video->isp, &buf->sgt); | 495 | addr = omap_iommu_vmap(video->isp->domain, video->isp->dev, 0, |
496 | &buf->sgt, IOVMF_ENDIAN_LITTLE | IOVMF_ELSZ_8); | ||
525 | if (IS_ERR_VALUE(addr)) { | 497 | if (IS_ERR_VALUE(addr)) { |
526 | ret = -EIO; | 498 | ret = -EIO; |
527 | goto done; | 499 | goto done; |