From ab95acf7bb7b3e5cddaabdaa8497ec7fb2a97c99 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Sun, 21 Oct 2007 13:09:10 +0200 Subject: ivtv: yuv frame parameter fix From: Ian Armstrong Inadvertently missed a line when converting code to new hardware buffering method. In some circumstances, this would lead to a frame being displayed using parameters belonging to another frame. Signed-off-by: Ian Armstrong Signed-off-by: Hans Verkuil --- linux/drivers/media/video/ivtv/ivtv-irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linux/drivers/media/video/ivtv') diff --git a/linux/drivers/media/video/ivtv/ivtv-irq.c b/linux/drivers/media/video/ivtv/ivtv-irq.c index cc82ce028..ac174fc0d 100644 --- a/linux/drivers/media/video/ivtv/ivtv-irq.c +++ b/linux/drivers/media/video/ivtv/ivtv-irq.c @@ -803,7 +803,7 @@ static void ivtv_irq_vsync(struct ivtv *itv) /* Check if we need to update the yuv registers */ if ((yi->yuv_forced_update || yi->new_frame_info[last_dma_frame].update) && last_dma_frame != -1) { if (!yi->new_frame_info[last_dma_frame].update) - last_dma_frame = (last_dma_frame - 1) & 3; + last_dma_frame = (u8)(last_dma_frame - 1) % IVTV_YUV_BUFFERS; if (yi->new_frame_info[last_dma_frame].src_w) { yi->update_frame = last_dma_frame; -- cgit v1.2.3