Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=943e8910db31e36d945f2bf7d4c273ca5fa01f6e
Commit:     943e8910db31e36d945f2bf7d4c273ca5fa01f6e
Parent:     68a341a53ab5a3c5b7dad4b226124414c62c124d
Author:     Ian Armstrong <[EMAIL PROTECTED]>
AuthorDate: Fri Aug 3 09:58:29 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Tue Oct 9 22:04:28 2007 -0300

    V4L/DVB (5972): ivtv: prevent yuv register updates from being missed
    
    The yuv output code always compares the new frame position & size with those
    of the previous frame. If they are different, a flag is set to request the
    yuv output registers be updated when the new frame is displayed.
    
    If the incoming frames are delivered too fast, exhausting the buffers, the
    most recent frame already buffered will be discarded. Unfortunately, any
    update request will also be discarded. If the new frame matches the size &
    position of the now discarded frame, the yuv registers are not flagged for
    update & will remain in their old state.
    
    This patch preserves the register update flag in the event that a frame is
    dropped.
    
    Signed-off-by: Ian Armstrong <[EMAIL PROTECTED]>
    Signed-off-by: Hans Verkuil <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/video/ivtv/ivtv-yuv.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/ivtv/ivtv-yuv.c 
b/drivers/media/video/ivtv/ivtv-yuv.c
index 70ddf40..5c94d32 100644
--- a/drivers/media/video/ivtv/ivtv-yuv.c
+++ b/drivers/media/video/ivtv/ivtv-yuv.c
@@ -940,6 +940,7 @@ int ivtv_yuv_prep_frame(struct ivtv *itv, struct 
ivtv_dma_frame *args)
        int rc = 0;
        int got_sig = 0;
        int frame, next_fill_frame, last_fill_frame;
+       int register_update = 0;
 
        IVTV_DEBUG_INFO("yuv_prep_frame\n");
 
@@ -953,6 +954,7 @@ int ivtv_yuv_prep_frame(struct ivtv *itv, struct 
ivtv_dma_frame *args)
                /* Buffers are full - Overwrite the last frame */
                next_fill_frame = frame;
                frame = (frame - 1) & 3;
+               register_update = itv->yuv_info.new_frame_info[frame].update;
        }
 
        /* Take a snapshot of the yuv coordinate information */
@@ -991,6 +993,8 @@ int ivtv_yuv_prep_frame(struct ivtv *itv, struct 
ivtv_dma_frame *args)
 /*             IVTV_DEBUG_YUV ("Requesting register update for frame 
%d\n",frame); */
        }
 
+       itv->yuv_info.new_frame_info[frame].update |= register_update;
+
        /* DMA the frame */
        mutex_lock(&itv->udma.lock);
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to