summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ivtv/ivtv-irq.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2007-08-18 15:48:42 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-10-09 22:05:37 -0300
commite17a06badaedba89fad989eed409661c89a22e04 (patch)
treef24043bfa94678b8b0d09aa906ecab1974c365d0 /drivers/media/video/ivtv/ivtv-irq.c
parent51a99c0428cc6d3a442eef1c9046099c9383d72b (diff)
V4L/DVB (6050): ivtv: retry/timer improvements
- Give up frame after three retries. - When the last capture/decode ends, make sure to delete the dma_timer. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-irq.c')
-rw-r--r--drivers/media/video/ivtv/ivtv-irq.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/video/ivtv/ivtv-irq.c b/drivers/media/video/ivtv/ivtv-irq.c
index 7272f1a71dd..d68853fd60a 100644
--- a/drivers/media/video/ivtv/ivtv-irq.c
+++ b/drivers/media/video/ivtv/ivtv-irq.c
@@ -494,7 +494,9 @@ static void ivtv_irq_dma_read(struct ivtv *itv)
s->sg_processed, s->sg_processing_size, itv->dma_retries);
write_reg(read_reg(IVTV_REG_DMASTATUS) & 3, IVTV_REG_DMASTATUS);
if (itv->dma_retries == 3) {
+ /* Too many retries, give up on this frame */
itv->dma_retries = 0;
+ s->sg_processed = s->sg_processing_size;
}
else {
/* Retry, starting with the first xfer segment.
@@ -554,7 +556,9 @@ static void ivtv_irq_enc_dma_complete(struct ivtv *itv)
s->dma_offset, s->sg_processed, s->sg_processing_size, itv->dma_retries);
write_reg(read_reg(IVTV_REG_DMASTATUS) & 3, IVTV_REG_DMASTATUS);
if (itv->dma_retries == 3) {
+ /* Too many retries, give up on this frame */
itv->dma_retries = 0;
+ s->sg_processed = s->sg_processing_size;
}
else {
/* Retry, starting with the first xfer segment.