summaryrefslogtreecommitdiff
path: root/drivers/media/pci/tw686x/tw686x-core.c
diff options
context:
space:
mode:
authorEzequiel Garcia <ezequiel@vanguardiasur.com.ar>2016-06-04 23:47:17 (GMT)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>2016-06-28 10:50:09 (GMT)
commit34e2acc8df13919d5a1aef450c6905b6329fa5b9 (patch)
treeeedcdb834b1e066ea6b4677c2a6607e20880b56b /drivers/media/pci/tw686x/tw686x-core.c
parent11a1697404ac8e58dd1483a280a2e799a71c3510 (diff)
downloadlinux-34e2acc8df13919d5a1aef450c6905b6329fa5b9.tar.xz
[media] tw686x: Add support for DMA scatter-gather mode
Now that the driver has the infrastructure to support more DMA modes, let's add the DMA scatter-gather mode. In this mode, the device delivers sequential top-bottom frames. The scatter-gather logic is based on staging's tw686x-kh driver (by Krzysztof Ha?asa). Tested-by: Tim Harvey <tharvey@gateworks.com> Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/pci/tw686x/tw686x-core.c')
-rw-r--r--drivers/media/pci/tw686x/tw686x-core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/pci/tw686x/tw686x-core.c b/drivers/media/pci/tw686x/tw686x-core.c
index 9a7646c..586bc67 100644
--- a/drivers/media/pci/tw686x/tw686x-core.c
+++ b/drivers/media/pci/tw686x/tw686x-core.c
@@ -65,6 +65,8 @@ static const char *dma_mode_name(unsigned int mode)
return "memcpy";
case TW686X_DMA_MODE_CONTIG:
return "contig";
+ case TW686X_DMA_MODE_SG:
+ return "sg";
default:
return "unknown";
}
@@ -81,6 +83,8 @@ static int tw686x_dma_mode_set(const char *val, struct kernel_param *kp)
dma_mode = TW686X_DMA_MODE_MEMCPY;
else if (!strcasecmp(val, dma_mode_name(TW686X_DMA_MODE_CONTIG)))
dma_mode = TW686X_DMA_MODE_CONTIG;
+ else if (!strcasecmp(val, dma_mode_name(TW686X_DMA_MODE_SG)))
+ dma_mode = TW686X_DMA_MODE_SG;
else
return -EINVAL;
return 0;