summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7164/saa7164-encoder.c
diff options
context:
space:
mode:
authorSteven Toth <stoth@kernellabs.com>2010-07-31 20:29:34 +0200
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-21 11:54:58 +0200
commitb31f1222990c02bccb73805648493b5e132a52f9 (patch)
treecc9ca91a3a3ea3592b458accffae5291734526f1 /drivers/media/video/saa7164/saa7164-encoder.c
parent[media] saa7164: Implement resolution control firmware command (diff)
downloadlinux-b31f1222990c02bccb73805648493b5e132a52f9.tar.xz
linux-b31f1222990c02bccb73805648493b5e132a52f9.zip
[media] saa7164: mundane buffer debugging changes to track issues
Code is removed in future patches in this set. Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/saa7164/saa7164-encoder.c')
-rw-r--r--drivers/media/video/saa7164/saa7164-encoder.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/media/video/saa7164/saa7164-encoder.c b/drivers/media/video/saa7164/saa7164-encoder.c
index 08b62e41c466..b904c61f8f81 100644
--- a/drivers/media/video/saa7164/saa7164-encoder.c
+++ b/drivers/media/video/saa7164/saa7164-encoder.c
@@ -1008,6 +1008,7 @@ struct saa7164_user_buffer *saa7164_enc_next_buf(struct saa7164_port *port)
struct saa7164_user_buffer *buf = 0;
struct saa7164_dev *dev = port->dev;
u32 crc;
+ u32 *d;
mutex_lock(&port->dmaqueue_lock);
if (!list_empty(&port->list_buf_used.list)) {
@@ -1020,6 +1021,13 @@ struct saa7164_user_buffer *saa7164_enc_next_buf(struct saa7164_port *port)
buf, buf->crc, crc);
}
+ d = (u32 *)buf->data;
+
+ if ((*d & 0xffffff) > (port->read_counter + 0x2000))
+ printk(KERN_ERR "%s() *d 0x%x port %p\n", __func__, *d, port);
+
+ port->read_counter = *d;
+
}
mutex_unlock(&port->dmaqueue_lock);