diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2007-08-18 14:48:42 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-09 21:05:37 -0400 |
commit | e17a06badaedba89fad989eed409661c89a22e04 (patch) | |
tree | f24043bfa94678b8b0d09aa906ecab1974c365d0 /drivers/media/video/ivtv/ivtv-irq.c | |
parent | 51a99c0428cc6d3a442eef1c9046099c9383d72b (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.c | 4 |
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 7272f1a71dd9..d68853fd60a3 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) | |||
494 | s->sg_processed, s->sg_processing_size, itv->dma_retries); | 494 | s->sg_processed, s->sg_processing_size, itv->dma_retries); |
495 | write_reg(read_reg(IVTV_REG_DMASTATUS) & 3, IVTV_REG_DMASTATUS); | 495 | write_reg(read_reg(IVTV_REG_DMASTATUS) & 3, IVTV_REG_DMASTATUS); |
496 | if (itv->dma_retries == 3) { | 496 | if (itv->dma_retries == 3) { |
497 | /* Too many retries, give up on this frame */ | ||
497 | itv->dma_retries = 0; | 498 | itv->dma_retries = 0; |
499 | s->sg_processed = s->sg_processing_size; | ||
498 | } | 500 | } |
499 | else { | 501 | else { |
500 | /* Retry, starting with the first xfer segment. | 502 | /* Retry, starting with the first xfer segment. |
@@ -554,7 +556,9 @@ static void ivtv_irq_enc_dma_complete(struct ivtv *itv) | |||
554 | s->dma_offset, s->sg_processed, s->sg_processing_size, itv->dma_retries); | 556 | s->dma_offset, s->sg_processed, s->sg_processing_size, itv->dma_retries); |
555 | write_reg(read_reg(IVTV_REG_DMASTATUS) & 3, IVTV_REG_DMASTATUS); | 557 | write_reg(read_reg(IVTV_REG_DMASTATUS) & 3, IVTV_REG_DMASTATUS); |
556 | if (itv->dma_retries == 3) { | 558 | if (itv->dma_retries == 3) { |
559 | /* Too many retries, give up on this frame */ | ||
557 | itv->dma_retries = 0; | 560 | itv->dma_retries = 0; |
561 | s->sg_processed = s->sg_processing_size; | ||
558 | } | 562 | } |
559 | else { | 563 | else { |
560 | /* Retry, starting with the first xfer segment. | 564 | /* Retry, starting with the first xfer segment. |