1. 04 7月, 2018 2 次提交
  2. 22 3月, 2018 1 次提交
  3. 12 2月, 2018 1 次提交
    • L
      vfs: do bulk POLL* -> EPOLL* replacement · a9a08845
      Linus Torvalds 提交于
      This is the mindless scripted replacement of kernel use of POLL*
      variables as described by Al, done by this script:
      
          for V in IN OUT PRI ERR RDNORM RDBAND WRNORM WRBAND HUP RDHUP NVAL MSG; do
              L=`git grep -l -w POLL$V | grep -v '^t' | grep -v /um/ | grep -v '^sa' | grep -v '/poll.h$'|grep -v '^D'`
              for f in $L; do sed -i "-es/^\([^\"]*\)\(\<POLL$V\>\)/\\1E\\2/" $f; done
          done
      
      with de-mangling cleanups yet to come.
      
      NOTE! On almost all architectures, the EPOLL* constants have the same
      values as the POLL* constants do.  But they keyword here is "almost".
      For various bad reasons they aren't the same, and epoll() doesn't
      actually work quite correctly in some cases due to this on Sparc et al.
      
      The next patch from Al will sort out the final differences, and we
      should be all done.
      Scripted-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a9a08845
  4. 28 11月, 2017 1 次提交
  5. 07 11月, 2017 1 次提交
  6. 31 10月, 2017 1 次提交
  7. 05 10月, 2017 1 次提交
  8. 20 6月, 2017 2 次提交
    • T
      [media] v4l2-core: Use kvmalloc() for potentially big allocations · 758d90e1
      Tomasz Figa 提交于
      There are multiple places where arrays or otherwise variable sized
      buffer are allocated through V4L2 core code, including things like
      controls, memory pages, staging buffers for ioctls and so on. Such
      allocations can potentially require an order > 0 allocation from the
      page allocator, which is not guaranteed to be fulfilled and is likely to
      fail on a system with severe memory fragmentation (e.g. a system with
      very long uptime).
      
      Since the memory being allocated is intended to be used by the CPU
      exclusively, we can consider using vmalloc() as a fallback and this is
      exactly what the recently merged kvmalloc() helpers do. A kmalloc() call
      is still attempted, even for order > 0 allocations, but it is done
      with __GFP_NORETRY and __GFP_NOWARN, with expectation of failing if
      requested memory is not available instantly. Only then the vmalloc()
      fallback is used. This should give us fast and more reliable allocations
      even on systems with higher memory pressure and/or more fragmentation,
      while still retaining the same performance level on systems not
      suffering from such conditions.
      
      While at it, replace explicit array size calculations on changed
      allocations with kvmalloc_array().
      
      Purposedly not touching videobuf1, as it is deprecated, has only few
      users remaining and would rather be seen removed instead.
      Signed-off-by: NTomasz Figa <tfiga@chromium.org>
      Acked-by: NMarek Szyprowski <m.szyprowski@samsung.com>
      Acked-by: NSakari Ailus <sakari.ailus@linux.intel.com>
      Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      758d90e1
    • S
      [media] v4l: ctrls: Add a control for digital gain · e72cb0e7
      Sakari Ailus 提交于
      Add V4L2_CID_DIGITAL_GAIN to control explicitly digital gain.
      
      We already have analogue gain control which the digital gain control
      complements. Typically higher quality images are obtained using analogue
      gain only as the digital gain does not add information to the image
      (rather it may remove it).
      Signed-off-by: NSakari Ailus <sakari.ailus@linux.intel.com>
      Acked-by: NHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      e72cb0e7
  9. 07 6月, 2017 2 次提交
  10. 15 4月, 2017 1 次提交
  11. 10 4月, 2017 1 次提交
  12. 03 2月, 2017 1 次提交
  13. 17 11月, 2016 1 次提交
  14. 25 8月, 2016 1 次提交
    • S
      [media] media: v4l2-ctrls: append missing h264 profile string · 15d6e91a
      Stanimir Varbanov 提交于
      This appends missing "Stereo High" h264 profile string. Without
      it the v4l2 compliance would crash kernel with NULL pointer
      dereference at:
      
      [   26.882278] [<ffff000008685cbc>] std_validate+0x378/0x42c
      [   26.886967] [<ffff000008687424>] set_ctrl+0x8c/0x134
      [   26.892521] [<ffff00000868755c>] v4l2_s_ctrl+0x90/0xf4
      [   26.897555] [<ffff00000867f3b0>] v4l_s_ctrl+0x4c/0x110
      [   26.902503] [<ffff00000867db04>] __video_do_ioctl+0x240/0x2b4
      [   26.907625] [<ffff00000867d778>] video_usercopy+0x33c/0x46c
      [   26.913441] [<ffff00000867d8bc>] video_ioctl2+0x14/0x1c
      [   26.918822] [<ffff000008678878>] v4l2_ioctl+0xe0/0x110
      [   26.924032] [<ffff0000081da898>] do_vfs_ioctl+0xb4/0x764
      [   26.929238] [<ffff0000081dafcc>] SyS_ioctl+0x84/0x98
      [   26.934707] [<ffff000008082f4c>] __sys_trace_return+0x0/0x4
      Signed-off-by: NStanimir Varbanov <stanimir.varbanov@linaro.org>
      Acked-by: NSakari Ailus <sakari.ailus@linux.intel.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      15d6e91a
  15. 12 7月, 2016 1 次提交
  16. 19 2月, 2016 1 次提交
  17. 10 2月, 2016 2 次提交
  18. 18 11月, 2015 3 次提交
  19. 21 10月, 2015 2 次提交
    • A
      [media] media/v4l2-ctrls: fix setting autocluster to manual with VIDIOC_S_CTRL · 759b26a1
      Antonio Ospite 提交于
      Since commit 5d0360a4 it's not possible
      anymore to set auto clusters from auto to manual using VIDIOC_S_CTRL.
      
      For example, setting autogain to manual with gspca/ov534 driver and this
      sequence of commands does not work:
      
        v4l2-ctl --set-ctrl=gain_automatic=1
        v4l2-ctl --list-ctrls | grep gain_automatic
        # The following does not work
        v4l2-ctl --set-ctrl=gain_automatic=0
        v4l2-ctl --list-ctrls | grep gain_automatic
      
      Changing the value using VIDIOC_S_EXT_CTRLS (like qv4l2 does) works
      fine.
      
      The apparent cause by looking at the changes in 5d0360a4 and comparing
      with the code path for VIDIOC_S_EXT_CTRLS seems to be that the code in
      v4l2-ctrls.c::set_ctrl() is not calling user_to_new() anymore after
      calling update_from_auto_cluster(master).
      
      However the root cause of the problem is that calling
      update_from_auto_cluster(master) overrides also the _master_ control
      state calling cur_to_new() while it was supposed to only update the
      volatile controls.
      
      Calling user_to_new() after update_from_auto_cluster(master) was just
      masking the original bug by restoring the correct new value of the
      master control before making the changes permanent.
      
      Fix the original bug by making update_from_auto_cluster() not override
      the new master control value.
      Signed-off-by: NAntonio Ospite <ao2@ao2.it>
      Cc: <stable@vger.kernel.org>      # for v3.17 and up
      Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      759b26a1
    • A
      [media] v4l2: add RF gain control · 41018cb8
      Antti Palosaari 提交于
      Add new RF tuner gain control named RF Gain. That is aimed for first
      amplifier chip right after antenna connector.
      There is existing LNA Gain control, which is quite same, but it is
      aimed for cases amplifier is integrated to tuner chip. Some designs
      have both, as almost all recent tuner silicons has integrated LNA/RF
      amplifier in any case.
      Signed-off-by: NAntti Palosaari <crope@iki.fi>
      Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      41018cb8
  20. 01 10月, 2015 2 次提交
  21. 06 7月, 2015 1 次提交
  22. 08 4月, 2015 3 次提交
  23. 29 10月, 2014 1 次提交
    • H
      [media] v4l2-ctrls: fix sparse warning · 7a7f1ab3
      Hans Verkuil 提交于
      The warning is simple:
      
      drivers/media/v4l2-core/v4l2-ctrls.c:1685:15: warning: incorrect type in assignment (different address spaces)
      
      but the fix isn't.
      
      The core problem was that the conversion from user to kernelspace was
      done at too low a level and that needed to be moved up. That made it possible
      to drop pointers to v4l2_ext_control from set_ctrl and validate_new and
      clean up this sparse warning because those functions now always operate
      on kernelspace pointers.
      Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      7a7f1ab3
  24. 22 9月, 2014 1 次提交
  25. 22 8月, 2014 1 次提交
  26. 28 7月, 2014 1 次提交
    • H
      [media] v4l2-ctrls: fix rounding calculation · 9c9cb1fa
      Hans Verkuil 提交于
      Commit 958c7c7e ("[media] v4l2-ctrls: fix corner case in round-to-range code") broke
      controls that use a negative range.
      
      The cause was a s32/u32 mixup: ctrl->step is unsigned while all others are signed. So
      the result type of the expression '(ctrl)->maximum - ((ctrl)->step / 2)' became unsigned,
      making 'val >= (ctrl)->maximum - ((ctrl)->step / 2)' true, since '((u32)-128) > 128'
      (if val = -128, maximum = 128 and step = 1).
      
      So carefully cast (step / 2) to s32.
      
      There was one cast of step to s32 where it should have been u32 because both offset and
      step are unsigned, so casting to signed makes no sense there. You do need a cast to u32
      there, because otherwise architectures that have no 64-bit division start complaining
      (step is a u64).
      Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
      Reported-by: NFrank Schäfer <fschaefer.oss@googlemail.com>
      Signed-off-by: NMauro Carvalho Chehab <m.chehab@samsung.com>
      9c9cb1fa
  27. 26 7月, 2014 3 次提交
  28. 22 7月, 2014 1 次提交