diff options
author | Steven Toth <stoth@kernellabs.com> | 2010-07-31 15:13:45 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-21 07:54:54 -0200 |
commit | 12d3203e39db306f56611b3f47ba425ca6a409f9 (patch) | |
tree | 3e7eba22186a7015be6529abd2c3ee3659b0b77c /drivers/media/video/saa7164/saa7164-encoder.c | |
parent | 46eeb8dd30d3651e6ea55c2e60594206cd591d79 (diff) |
[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.c | 9 |
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 c61907d0efb9..f3ecdc93e20e 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); |