1. 11 Mar, 2014 4 commits
    • Hans Verkuil's avatar
      [media] vb2: fix PREPARE_BUF regression · 952c9ee2
      Hans Verkuil authored
      Fix an incorrect test in vb2_internal_qbuf() where only DEQUEUED buffers
      are allowed. But PREPARED buffers are also OK.
      
      Introduced by commit 4138111a
      ("vb2: simplify qbuf/prepare_buf by removing callback").
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Acked-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
      952c9ee2
    • Hans Verkuil's avatar
      [media] vb2: fix read/write regression · 4e5a4d8a
      Hans Verkuil authored
      Commit 88e26870 ("vb2: Improve file I/O
      emulation to handle buffers in any order") broke read/write support if
      the size of the buffer being read/written is less than the size of the
      image.
      
      When the commit was tested originally I used qv4l2, which calls read()
      with exactly the size of the image. But if you try 'cat /dev/video0'
      then it will fail and typically hang after reading two buffers.
      
      This patch fixes the behavior by adding a new cur_index field that
      contains the index of the field currently being filled/read, or it
      is num_buffers in which case a new buffer needs to be dequeued.
      
      The old index field has been renamed to initial_index in order to be
      a bit more descriptive.
      
      This has been tested with both read and write.
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Tested-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Cc: Andy Walls <awalls@md.metrocast.net>
      Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
      4e5a4d8a
    • Ricardo Ribalda Delgado's avatar
      [media] vb2: Check if there are buffers before streamon · 249f5a58
      Ricardo Ribalda Delgado authored
      This patch adds a test preventing streamon() if there is no buffer
      ready.
      
      Without this patch, a user could call streamon() before
      preparing any buffer. This leads to a situation where if he calls
      close() before calling streamoff() the device is kept streaming.
      Signed-off-by: default avatarRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>
      Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
      249f5a58
    • Mauro Carvalho Chehab's avatar
      Merge tag 'v3.14-rc5' into patchwork · c897df0e
      Mauro Carvalho Chehab authored
      Linux 3.14-rc5
      
      * tag 'v3.14-rc5': (1117 commits)
        Linux 3.14-rc5
        drm/vmwgfx: avoid null pointer dereference at failure paths
        drm/vmwgfx: Make sure backing mobs are cleared when allocated. Update driver date.
        drm/vmwgfx: Remove some unused surface formats
        MAINTAINERS: add maintainer entry for Armada DRM driver
        arm64: Fix !CONFIG_SMP kernel build
        arm64: mm: Add double logical invert to pte accessors
        dm cache: fix truncation bug when mapping I/O to >2TB fast device
        perf tools: Fix strict alias issue for find_first_bit
        powerpc/powernv: Fix indirect XSCOM unmangling
        powerpc/powernv: Fix opal_xscom_{read,write} prototype
        powerpc/powernv: Refactor PHB diag-data dump
        powerpc/powernv: Dump PHB diag-data immediately
        powerpc: Increase stack redzone for 64-bit userspace to 512 bytes
        powerpc/ftrace: bugfix for test_24bit_addr
        powerpc/crashdump : Fix page frame number check in copy_oldmem_page
        powerpc/le: Ensure that the 'stop-self' RTAS token is handled correctly
        kvm, vmx: Really fix lazy FPU on nested guest
        perf tools: fix BFD detection on opensuse
        drm/radeon: enable speaker allocation setup on dce3.2
        ...
      c897df0e
  2. 05 Mar, 2014 36 commits