aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2014-01-02 07:47:32 -0500
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-05-25 10:05:38 -0400
commit63746b5ff12a9ac64bd88a45b01b36e86f068d51 (patch)
tree38b28c926e5de0339f64a893fed31ce5537f7a78
parentcdd8be29c1fe89fe4ec69f09c4dd33524039a248 (diff)
[media] omap3isp: stat: Rename IS_COHERENT_BUF to ISP_STAT_USES_DMAENGINE
The macro is meant to test whether the statistics engine uses an external DMA engine to transfer data or supports DMA directly. As both cases will be supported by DMA coherent buffers rename the macro to ISP_STAT_USES_DMAENGINE for improved clarity. 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>
-rw-r--r--drivers/media/platform/omap3isp/ispstat.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/media/platform/omap3isp/ispstat.c b/drivers/media/platform/omap3isp/ispstat.c
index 5707f85c4cc4..48b702a568e3 100644
--- a/drivers/media/platform/omap3isp/ispstat.c
+++ b/drivers/media/platform/omap3isp/ispstat.c
@@ -32,7 +32,7 @@
32 32
33#include "isp.h" 33#include "isp.h"
34 34
35#define IS_COHERENT_BUF(stat) ((stat)->dma_ch >= 0) 35#define ISP_STAT_USES_DMAENGINE(stat) ((stat)->dma_ch >= 0)
36 36
37/* 37/*
38 * MAGIC_SIZE must always be the greatest common divisor of 38 * MAGIC_SIZE must always be the greatest common divisor of
@@ -99,7 +99,7 @@ static void isp_stat_buf_sync_magic_for_device(struct ispstat *stat,
99 u32 buf_size, 99 u32 buf_size,
100 enum dma_data_direction dir) 100 enum dma_data_direction dir)
101{ 101{
102 if (IS_COHERENT_BUF(stat)) 102 if (ISP_STAT_USES_DMAENGINE(stat))
103 return; 103 return;
104 104
105 __isp_stat_buf_sync_magic(stat, buf, buf_size, dir, 105 __isp_stat_buf_sync_magic(stat, buf, buf_size, dir,
@@ -111,7 +111,7 @@ static void isp_stat_buf_sync_magic_for_cpu(struct ispstat *stat,
111 u32 buf_size, 111 u32 buf_size,
112 enum dma_data_direction dir) 112 enum dma_data_direction dir)
113{ 113{
114 if (IS_COHERENT_BUF(stat)) 114 if (ISP_STAT_USES_DMAENGINE(stat))
115 return; 115 return;
116 116
117 __isp_stat_buf_sync_magic(stat, buf, buf_size, dir, 117 __isp_stat_buf_sync_magic(stat, buf, buf_size, dir,
@@ -180,7 +180,7 @@ static void isp_stat_buf_insert_magic(struct ispstat *stat,
180static void isp_stat_buf_sync_for_device(struct ispstat *stat, 180static void isp_stat_buf_sync_for_device(struct ispstat *stat,
181 struct ispstat_buffer *buf) 181 struct ispstat_buffer *buf)
182{ 182{
183 if (IS_COHERENT_BUF(stat)) 183 if (ISP_STAT_USES_DMAENGINE(stat))
184 return; 184 return;
185 185
186 dma_sync_sg_for_device(stat->isp->dev, buf->iovm->sgt->sgl, 186 dma_sync_sg_for_device(stat->isp->dev, buf->iovm->sgt->sgl,
@@ -190,7 +190,7 @@ static void isp_stat_buf_sync_for_device(struct ispstat *stat,
190static void isp_stat_buf_sync_for_cpu(struct ispstat *stat, 190static void isp_stat_buf_sync_for_cpu(struct ispstat *stat,
191 struct ispstat_buffer *buf) 191 struct ispstat_buffer *buf)
192{ 192{
193 if (IS_COHERENT_BUF(stat)) 193 if (ISP_STAT_USES_DMAENGINE(stat))
194 return; 194 return;
195 195
196 dma_sync_sg_for_cpu(stat->isp->dev, buf->iovm->sgt->sgl, 196 dma_sync_sg_for_cpu(stat->isp->dev, buf->iovm->sgt->sgl,
@@ -360,7 +360,7 @@ static void isp_stat_bufs_free(struct ispstat *stat)
360 for (i = 0; i < STAT_MAX_BUFS; i++) { 360 for (i = 0; i < STAT_MAX_BUFS; i++) {
361 struct ispstat_buffer *buf = &stat->buf[i]; 361 struct ispstat_buffer *buf = &stat->buf[i];
362 362
363 if (!IS_COHERENT_BUF(stat)) { 363 if (!ISP_STAT_USES_DMAENGINE(stat)) {
364 if (IS_ERR_OR_NULL((void *)buf->iommu_addr)) 364 if (IS_ERR_OR_NULL((void *)buf->iommu_addr))
365 continue; 365 continue;
366 if (buf->iovm) 366 if (buf->iovm)
@@ -489,7 +489,7 @@ static int isp_stat_bufs_alloc(struct ispstat *stat, u32 size)
489 489
490 isp_stat_bufs_free(stat); 490 isp_stat_bufs_free(stat);
491 491
492 if (IS_COHERENT_BUF(stat)) 492 if (ISP_STAT_USES_DMAENGINE(stat))
493 return isp_stat_bufs_alloc_dma(stat, size); 493 return isp_stat_bufs_alloc_dma(stat, size);
494 else 494 else
495 return isp_stat_bufs_alloc_iommu(stat, size); 495 return isp_stat_bufs_alloc_iommu(stat, size);