linux/drivers/media
Hans Verkuil 412376a153 [media] vb2: fix handling of data_offset and v4l2_plane.reserved[]
The videobuf2-core did not zero the 'planes' array in __qbuf_userptr()
and __qbuf_dmabuf(). That's now memset to 0. Without this the reserved
array in struct v4l2_plane would be non-zero, causing v4l2-compliance
errors.

More serious is the fact that data_offset was not handled correctly:

- for capture devices it was never zeroed, which meant that it was
  uninitialized. Unless the driver sets it it was a completely random
  number. With the memset above this is now fixed.

- __qbuf_dmabuf had a completely incorrect length check that included
  data_offset.

- in __fill_vb2_buffer in the DMABUF case the data_offset field was
  unconditionally copied from v4l2_buffer to v4l2_plane when this
  should only happen in the output case.

- in the single-planar case data_offset was never correctly set to 0.
  The single-planar API doesn't support data_offset, so setting it
  to 0 is the right thing to do. This too is now solved by the memset.

All these issues were found with v4l2-compliance.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Pawel Osciak <pawel@osciak.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-04-16 18:41:36 -03:00
..
common [media] rc: abstract access to allowed/enabled protocols 2014-03-11 13:24:39 -03:00
dvb-core [media] dvb_frontend: Fix possible read out of bounds 2014-03-12 10:21:09 -03:00
dvb-frontends [media] lgdt3305: include sleep functionality in lgdt3304_ops 2014-04-07 09:40:24 -03:00
firewire firewire: introduce fw_driver.probe and .remove methods 2013-06-09 18:15:00 +02:00
i2c [media] adv7842: Disable access to EDID DDC lines before chip power up 2014-04-16 18:22:02 -03:00
mmc [media] siano: get rid of CammelCase from smscoreapi.h 2013-03-21 10:03:16 -03:00
parport [media] vb2: call buf_finish from __queue_cancel 2014-03-11 06:56:39 -03:00
pci [media] bttv: Add support for PCI-8604PW 2014-04-16 18:22:48 -03:00
platform [media] media: davinci: vpfe: use v4l2_fh for priority handling 2014-04-16 18:24:15 -03:00
radio [media] si4713: fix Kconfig dependencies 2014-03-28 18:06:55 -03:00
rc [media] rc-core: remove generic scancode filter 2014-04-06 11:30:29 -03:00
tuners [media] r820t: fix size and init values 2014-04-07 09:39:13 -03:00
usb [media] gspca_gl860: Clean up idxdata structs 2014-04-16 18:13:56 -03:00
v4l2-core [media] vb2: fix handling of data_offset and v4l2_plane.reserved[] 2014-04-16 18:41:36 -03:00
Kconfig [media] subdev autoselect only works if I2C and I2C_MUX is selected 2013-12-21 06:03:06 -02:00
Makefile
media-device.c [media] media: info leak in __media_device_enum_links() 2013-06-12 18:52:45 -03:00
media-devnode.c
media-entity.c [media] media: Check for active links on pads with MEDIA_PAD_FL_MUST_CONNECT flag 2013-12-04 15:03:45 -02:00