summaryrefslogtreecommitdiff
path: root/drivers/media/video/saa7164/saa7164-encoder.c
diff options
context:
space:
mode:
authorSteven Toth <stoth@kernellabs.com>2010-07-31 18:13:45 (GMT)
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-21 09:54:54 (GMT)
commit12d3203e39db306f56611b3f47ba425ca6a409f9 (patch)
tree3e7eba22186a7015be6529abd2c3ee3659b0b77c /drivers/media/video/saa7164/saa7164-encoder.c
parent46eeb8dd30d3651e6ea55c2e60594206cd591d79 (diff)
downloadlinux-fsl-qoriq-12d3203e39db306f56611b3f47ba425ca6a409f9.tar.xz
[media] saa7164: buffer crc checks and ensure we use the memcpy func
Buffer crc checks and ensure we use the correct PCIe IO memcpy func 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.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/media/video/saa7164/saa7164-encoder.c b/drivers/media/video/saa7164/saa7164-encoder.c
index c61907d..f3ecdc9 100644
--- a/drivers/media/video/saa7164/saa7164-encoder.c
+++ b/drivers/media/video/saa7164/saa7164-encoder.c
@@ -865,6 +865,7 @@ static int saa7164_encoder_start_streaming(struct saa7164_port *port)
/* Configure the encoder with any cache values */
saa7164_api_set_encoder(port);
+ saa7164_api_get_encoder(port);
saa7164_buffer_cfg_port(port);
@@ -1006,11 +1007,19 @@ 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;
mutex_lock(&port->dmaqueue_lock);
if (!list_empty(&port->list_buf_used.list)) {
buf = list_first_entry(&port->list_buf_used.list,
struct saa7164_user_buffer, list);
+
+ crc = crc32(0, buf->data, buf->actual_size);
+ if (crc != buf->crc) {
+ printk(KERN_ERR "%s() buf %p crc became invalid, was 0x%x became 0x%x\n", __func__,
+ buf, buf->crc, crc);
+ }
+
}
mutex_unlock(&port->dmaqueue_lock);