aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ivtv/ivtv-irq.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-irq.c')
-rw-r--r--drivers/media/video/ivtv/ivtv-irq.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/video/ivtv/ivtv-irq.c b/drivers/media/video/ivtv/ivtv-irq.c
index a97d55fd2277..8644f3dda31e 100644
--- a/drivers/media/video/ivtv/ivtv-irq.c
+++ b/drivers/media/video/ivtv/ivtv-irq.c
@@ -214,6 +214,7 @@ static int stream_enc_dma_append(struct ivtv_stream *s, u32 data[CX2341X_MBOX_MA
214 s->SGarray[idx].src = cpu_to_le32(offset); 214 s->SGarray[idx].src = cpu_to_le32(offset);
215 s->SGarray[idx].size = cpu_to_le32(s->buf_size); 215 s->SGarray[idx].size = cpu_to_le32(s->buf_size);
216 buf->bytesused = (size < s->buf_size) ? size : s->buf_size; 216 buf->bytesused = (size < s->buf_size) ? size : s->buf_size;
217 buf->dma_xfer_cnt = s->dma_xfer_cnt;
217 218
218 s->q_predma.bytesused += buf->bytesused; 219 s->q_predma.bytesused += buf->bytesused;
219 size -= buf->bytesused; 220 size -= buf->bytesused;
@@ -286,7 +287,7 @@ static void dma_post(struct ivtv_stream *s)
286 /* flag byteswap ABCD -> DCBA for MPG & VBI data outside irq */ 287 /* flag byteswap ABCD -> DCBA for MPG & VBI data outside irq */
287 if (s->type == IVTV_ENC_STREAM_TYPE_MPG || 288 if (s->type == IVTV_ENC_STREAM_TYPE_MPG ||
288 s->type == IVTV_ENC_STREAM_TYPE_VBI) 289 s->type == IVTV_ENC_STREAM_TYPE_VBI)
289 set_bit(IVTV_F_B_NEED_BUF_SWAP, &buf->b_flags); 290 buf->b_flags |= IVTV_F_B_NEED_BUF_SWAP;
290 } 291 }
291 if (buf) 292 if (buf)
292 buf->bytesused += s->dma_last_offset; 293 buf->bytesused += s->dma_last_offset;
@@ -396,12 +397,14 @@ static void ivtv_dma_enc_start(struct ivtv_stream *s)
396 } 397 }
397 itv->vbi.dma_offset = s_vbi->dma_offset; 398 itv->vbi.dma_offset = s_vbi->dma_offset;
398 s_vbi->SG_length = 0; 399 s_vbi->SG_length = 0;
400 s_vbi->dma_xfer_cnt++;
399 set_bit(IVTV_F_S_DMA_HAS_VBI, &s->s_flags); 401 set_bit(IVTV_F_S_DMA_HAS_VBI, &s->s_flags);
400 IVTV_DEBUG_HI_DMA("include DMA for %s\n", s->name); 402 IVTV_DEBUG_HI_DMA("include DMA for %s\n", s->name);
401 } 403 }
402 404
403 /* Mark last buffer size for Interrupt flag */ 405 /* Mark last buffer size for Interrupt flag */
404 s->SGarray[s->SG_length - 1].size |= cpu_to_le32(0x80000000); 406 s->SGarray[s->SG_length - 1].size |= cpu_to_le32(0x80000000);
407 s->dma_xfer_cnt++;
405 408
406 if (s->type == IVTV_ENC_STREAM_TYPE_VBI) 409 if (s->type == IVTV_ENC_STREAM_TYPE_VBI)
407 set_bit(IVTV_F_I_ENC_VBI, &itv->i_flags); 410 set_bit(IVTV_F_I_ENC_VBI, &itv->i_flags);