summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/ivtv/ivtv-irq.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2007-08-18 20:48:42 +0200
committerHans Verkuil <hverkuil@xs4all.nl>2007-08-18 20:48:42 +0200
commit1e0fb811716f6d1e429f43701e30d4ca10e142db (patch)
tree6526394c75f42065b444a4d944ea02424459d428 /linux/drivers/media/video/ivtv/ivtv-irq.c
parentcfc5c4e6bc9c0c61bb5696b0198117b9d34ddc3f (diff)
downloadmediapointer-dvb-s2-1e0fb811716f6d1e429f43701e30d4ca10e142db.tar.gz
mediapointer-dvb-s2-1e0fb811716f6d1e429f43701e30d4ca10e142db.tar.bz2
ivtv: retry/timer improvements
From: Hans Verkuil <hverkuil@xs4all.nl> - 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>
Diffstat (limited to 'linux/drivers/media/video/ivtv/ivtv-irq.c')
-rw-r--r--linux/drivers/media/video/ivtv/ivtv-irq.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/linux/drivers/media/video/ivtv/ivtv-irq.c b/linux/drivers/media/video/ivtv/ivtv-irq.c
index f6f9e490b..365176612 100644
--- a/linux/drivers/media/video/ivtv/ivtv-irq.c
+++ b/linux/drivers/media/video/ivtv/ivtv-irq.c
@@ -500,7 +500,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.
@@ -560,7 +562,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.