diff options
author | David Moore <dcm@acm.org> | 2007-04-08 23:54:41 +0200 |
---|---|---|
committer | Adrian Bunk <bunk@stusta.de> | 2007-04-08 23:54:41 +0200 |
commit | 2c461b3302b33de1500267a11cc50e29f33cbde6 (patch) | |
tree | a92ee1e7a22e8d0093fdd12ff65436d9dfc3c189 /drivers | |
parent | f95540a5193f909b5700555ceafc69bcb13d2174 (diff) |
ieee1394: video1394: DMA fix
This together with the phys_to_virt fix in lib/swiotlb.c::swiotlb_sync_sg
fixes video1394 DMA on machines with DMA bounce buffers, especially Intel
x86-64 machines with > 3GB RAM.
Signed-off-by: David Moore <dcm@acm.org>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ieee1394/video1394.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/ieee1394/video1394.c b/drivers/ieee1394/video1394.c index 216dbbf1dc8..2e80e90998a 100644 --- a/drivers/ieee1394/video1394.c +++ b/drivers/ieee1394/video1394.c @@ -491,6 +491,9 @@ static void wakeup_dma_ir_ctx(unsigned long l) reset_ir_status(d, i); d->buffer_status[d->buffer_prg_assignment[i]] = VIDEO1394_BUFFER_READY; do_gettimeofday(&d->buffer_time[d->buffer_prg_assignment[i]]); + dma_region_sync_for_cpu(&d->dma, + d->buffer_prg_assignment[i] * d->buf_size, + d->buf_size); } } @@ -1096,6 +1099,8 @@ static int __video1394_ioctl(struct file *file, DBGMSG(ohci->host->id, "Starting iso transmit DMA ctx=%d", d->ctx); put_timestamp(ohci, d, d->last_buffer); + dma_region_sync_for_device(&d->dma, + v.buffer * d->buf_size, d->buf_size); /* Tell the controller where the first program is */ reg_write(ohci, d->cmdPtr, @@ -1111,6 +1116,9 @@ static int __video1394_ioctl(struct file *file, "Waking up iso transmit dma ctx=%d", d->ctx); put_timestamp(ohci, d, d->last_buffer); + dma_region_sync_for_device(&d->dma, + v.buffer * d->buf_size, d->buf_size); + reg_write(ohci, d->ctrlSet, 0x1000); } } |