summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7164/saa7164-buffer.c
diff options
context:
space:
mode:
authorSteven Toth <stoth@kernellabs.com>2010-07-31 16:01:00 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-21 07:55:01 -0200
commit1b0e8e46297a214336d85c8e278a8a004f97889e (patch)
tree8bcfe776bfc8926b2636cf8bfe6efb630404e4f6 /drivers/media/video/saa7164/saa7164-buffer.c
parent7c1618227e6932fcd92597507ee63c01da73e623 (diff)
[media] saa7164: allow DMA engine buffers to vary in size between analog and digital
Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/saa7164/saa7164-buffer.c')
-rw-r--r--drivers/media/video/saa7164/saa7164-buffer.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/media/video/saa7164/saa7164-buffer.c b/drivers/media/video/saa7164/saa7164-buffer.c
index 5f45ea7f3d7..187e3f60fa5 100644
--- a/drivers/media/video/saa7164/saa7164-buffer.c
+++ b/drivers/media/video/saa7164/saa7164-buffer.c
@@ -134,18 +134,19 @@ struct saa7164_buffer *saa7164_buffer_alloc(struct saa7164_port *port,
buf->crc = crc32(0, buf->cpu, buf->actual_size);
memset_io(buf->pt_cpu, 0xff, buf->pt_size);
- dprintk(DBGLVL_BUF, "%s() allocated buffer @ 0x%p\n",
- __func__, buf);
+ dprintk(DBGLVL_BUF, "%s() allocated buffer @ 0x%p (%d pageptrs)\n",
+ __func__, buf, params->numpagetables);
dprintk(DBGLVL_BUF, " pci_cpu @ 0x%p dma @ 0x%08lx len = 0x%x\n",
buf->cpu, (long)buf->dma, buf->pci_size);
dprintk(DBGLVL_BUF, " pt_cpu @ 0x%p pt_dma @ 0x%08lx len = 0x%x\n",
buf->pt_cpu, (long)buf->pt_dma, buf->pt_size);
/* Format the Page Table Entries to point into the data buffer */
-// for (i = 0 ; i < SAA7164_PT_ENTRIES; i++) {
- for (i = 0 ; i < 10; i++) {
+ for (i = 0 ; i < params->numpagetables; i++) {
*(buf->pt_cpu + i) = buf->dma + (i * 0x1000); /* TODO */
+ dprintk(DBGLVL_BUF, " pt[%02d] = 0x%p -> 0x%llx\n",
+ i, buf->pt_cpu, (u64)*(buf->pt_cpu));
}