Merge tag 'media/v4.16-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull media fixes from Mauro Carvalho Chehab:

  - some build fixes with randconfigs

  - an m88ds3103 fix to prevent an OOPS if the chip doesn't provide the
    right version during probe (with can happen if the hardware hangs)

  - a potential out of array bounds reference in tvp5150

  - some fixes and improvements in the DVB memory mapped API (added for
    kernel 4.16)

* tag 'media/v4.16-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  media: vb2: Makefile: place vb2-trace together with vb2-core
  media: Don't let tvp5150_get_vbi() go out of vbi_ram_default array
  media: dvb: update buffer mmaped flags and frame counter
  media: dvb: add continuity error indicators for memory mapped buffers
  media: dmxdev: Fix the logic that enables DMA mmap support
  media: dmxdev: fix error code for invalid ioctls
  media: m88ds3103: don't call a non-initalized function
  media: au0828: add VIDEO_V4L2 dependency
  media: dvb: fix DVB_MMAP dependency
  media: dvb: fix DVB_MMAP symbol name
  media: videobuf2: fix build issues with vb2-trace
  media: videobuf2: Add VIDEOBUF2_V4L2 Kconfig option for VB2 V4L2 part
This commit is contained in:
Linus Torvalds
2018-03-03 10:27:14 -08:00
24 changed files with 329 additions and 175 deletions

View File

@@ -211,6 +211,32 @@ struct dmx_stc {
__u64 stc;
};
/**
* enum dmx_buffer_flags - DMX memory-mapped buffer flags
*
* @DMX_BUFFER_FLAG_HAD_CRC32_DISCARD:
* Indicates that the Kernel discarded one or more frames due to wrong
* CRC32 checksum.
* @DMX_BUFFER_FLAG_TEI:
* Indicates that the Kernel has detected a Transport Error indicator
* (TEI) on a filtered pid.
* @DMX_BUFFER_PKT_COUNTER_MISMATCH:
* Indicates that the Kernel has detected a packet counter mismatch
* on a filtered pid.
* @DMX_BUFFER_FLAG_DISCONTINUITY_DETECTED:
* Indicates that the Kernel has detected one or more frame discontinuity.
* @DMX_BUFFER_FLAG_DISCONTINUITY_INDICATOR:
* Received at least one packet with a frame discontinuity indicator.
*/
enum dmx_buffer_flags {
DMX_BUFFER_FLAG_HAD_CRC32_DISCARD = 1 << 0,
DMX_BUFFER_FLAG_TEI = 1 << 1,
DMX_BUFFER_PKT_COUNTER_MISMATCH = 1 << 2,
DMX_BUFFER_FLAG_DISCONTINUITY_DETECTED = 1 << 3,
DMX_BUFFER_FLAG_DISCONTINUITY_INDICATOR = 1 << 4,
};
/**
* struct dmx_buffer - dmx buffer info
*
@@ -220,15 +246,24 @@ struct dmx_stc {
* offset from the start of the device memory for this plane,
* (or a "cookie" that should be passed to mmap() as offset)
* @length: size in bytes of the buffer
* @flags: bit array of buffer flags as defined by &enum dmx_buffer_flags.
* Filled only at &DMX_DQBUF.
* @count: monotonic counter for filled buffers. Helps to identify
* data stream loses. Filled only at &DMX_DQBUF.
*
* Contains data exchanged by application and driver using one of the streaming
* I/O methods.
*
* Please notice that, for &DMX_QBUF, only @index should be filled.
* On &DMX_DQBUF calls, all fields will be filled by the Kernel.
*/
struct dmx_buffer {
__u32 index;
__u32 bytesused;
__u32 offset;
__u32 length;
__u32 flags;
__u32 count;
};
/**