Avoid(until there is a better fix) cleaning up of buffer as it will
cause partital green screen when there are frame dropped.

Fix video line couting corruption when cmd is not a video packet.

Signed-off-by: Bee Hock Goh <beeh...@gmail.com>

diff --git a/drivers/staging/tm6000/tm6000-video.c
b/drivers/staging/tm6000/tm6000-video.c
index c53de47..50b12ac 100644
--- a/drivers/staging/tm6000/tm6000-video.c
+++ b/drivers/staging/tm6000/tm6000-video.c
@@ -133,7 +133,7 @@ static inline void get_next_buf(struct
tm6000_dmaqueue *dma_q,
                               struct tm6000_buffer   **buf)
 {
        struct tm6000_core *dev = container_of(dma_q, struct tm6000_core, vidq);
-       char *outp;
+//     char *outp;

        if (list_empty(&dma_q->active)) {
                dprintk(dev, V4L2_DEBUG_QUEUE, "No active queue to serve\n");
@@ -148,8 +148,8 @@ static inline void get_next_buf(struct
tm6000_dmaqueue *dma_q,
                return;

        /* Cleans up buffer - Usefull for testing for frame/URB loss */
-       outp = videobuf_to_vmalloc(&(*buf)->vb);
-       memset(outp, 0, (*buf)->vb.size);
+//     outp = videobuf_to_vmalloc(&(*buf)->vb);
+//     memset(outp, 0, (*buf)->vb.size);

        return;
 }
@@ -282,7 +282,8 @@ static int copy_packet(struct urb *urb, u32
header, u8 **ptr, u8 *endp,
                        start_line=line;
                        last_field=field;
                }
-               last_line=line;
+               if (cmd == TM6000_URB_MSG_VIDEO)
+                       last_line=line;

                pktsize = TM6000_URB_MSG_LEN;
        } else {
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to