1. 24 3月, 2013 1 次提交
    • A
      [media] v4l2-ctrls: eliminate lockdep false alarms for struct v4l2_ctrl_handler.lock · 6cd247ef
      Andy Walls 提交于
      When calling v4l2_ctrl_add_handler(), lockdep would detect a potential
      recursive locking problem on a situation that is by design intended and
      not a recursive lock.  This happened because all struct
      v4l2_ctrl_handler.lock mutexes were created as members of the same lock
      class in v4l2_ctrl_handler_init(), and v4l2_ctrl_add_handler() takes the
      hdl->lock on two different v4l2_ctrl_handler instances.
      This change breaks the large lockdep lock class for struct
      v4l2_ctrl_handler.lock and breaks it into v4l2_ctrl_handler
      instantiation specific lock classes with meaningful class names.
      This will validly eliminate lockdep alarms for v4l2_ctrl_handler locking
      validation, as long as the relationships between drivers adding v4l2
      controls to their own handler from other v4l2 drivers' control handlers
      remains straightforward.
      struct v4l2_ctrl_handler.lock lock classes are created with names such
      that the output of cat /proc/lockdep indicates where in the v4l2 driver
      code v4l2_ctrl_handle_init() is being called on instantiations:
      ffffffffa045f490 FD:   10 BD:    8 +.+...: cx2341x:1534:(hdl)->lock
      ffffffffa0497d20 FD:   12 BD:    2 +.+.+.: saa7115:1581:(hdl)->lock
      ffffffffa04ac660 FD:   14 BD:    2 +.+.+.: msp3400_driver:756:(hdl)->lock
      ffffffffa0484b90 FD:   12 BD:    1 +.+.+.: ivtv_gpio:366:(&itv->hdl_gpio)->lock
      ffffffffa04eb530 FD:   11 BD:    2 +.+.+.: cx25840_core:1982:(&state->hdl)->lock
      ffffffffa04fbc80 FD:   11 BD:    3 +.+.+.: wm8775:246:(&state->hdl)->lock
      Some lock chains, that were previously causing the recursion alarms, are
      now visible in the output of cat /proc/lockdep_chains:
      irq_context: 0
      [ffffffffa0497d20] saa7115:1581:(hdl)->lock
      [ffffffffa045f490] cx2341x:1534:(hdl)->lock
      irq_context: 0
      [ffffffffa04ac660] msp3400_driver:756:(hdl)->lock
      [ffffffffa045f490] cx2341x:1534:(hdl)->lock
      irq_context: 0
      [ffffffffa0484b90] ivtv_gpio:366:(&itv->hdl_gpio)->lock
      [ffffffffa045f490] cx2341x:1534:(hdl)->lock
      irq_context: 0
      [ffffffffa04eb530] cx25840_core:1982:(&state->hdl)->lock
      [ffffffffa045f490] cx2341x:1534:(hdl)->lock
      irq_context: 0
      [ffffffffa04fbc80] wm8775:246:(&state->hdl)->lock
      [ffffffffa045f490] cx2341x:1534:(hdl)->lock
      Signed-off-by: NAndy Walls <awalls@md.metrocast.net>
      [hans.verkuil@cisco.com: keep mutex_init in v4l2_ctrl_handler_init_class]
      Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      6cd247ef
  2. 06 2月, 2013 3 次提交
  3. 06 1月, 2013 1 次提交
  4. 05 1月, 2013 1 次提交
  5. 06 10月, 2012 3 次提交
  6. 02 10月, 2012 1 次提交
  7. 26 9月, 2012 1 次提交
  8. 14 9月, 2012 2 次提交
  9. 14 8月, 2012 1 次提交
  10. 31 7月, 2012 2 次提交
  11. 15 5月, 2012 12 次提交
  12. 14 5月, 2012 3 次提交
  13. 08 5月, 2012 2 次提交
  14. 20 4月, 2012 1 次提交
  15. 18 4月, 2012 2 次提交
  16. 11 4月, 2012 1 次提交
  17. 20 3月, 2012 1 次提交
  18. 08 3月, 2012 1 次提交
    • H
      [media] v4l2-ctrls: v4l2_ctrl_add_handler should add all refs · 072e6602
      Hans Verkuil 提交于
      Currently v4l2_ctrl_add_handler adds only the controls that are owned
      by the handler. This is wrong. Instead all controls, whether owned or
      not, should be added.
      
      This is also implied by the v4l2-controls.txt documentation and it is
      clearly the right thing to do. The only reason this was never noticed
      before is because we never did this. Only recent changes in ivtv made
      this error visible because there a third handler layer was added (handler
      A inherits from handler B which inherits from C, D and E). Without this
      change handler A only sees the controls owned by handler B and the controls
      from C, D and E are missing.
      Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      072e6602
  19. 29 2月, 2012 1 次提交
    • S
      [media] V4L: Add JPEG compression control class · c7361ae1
      Sylwester Nawrocki 提交于
      The V4L2_CID_JPEG_CLASS control class is intended to expose various
      adjustable parameters of JPEG encoders and decoders. Following controls
      are defined:
      
       - V4L2_CID_JPEG_CHROMA_SUBSAMPLING,
       - V4L2_CID_JPEG_RESTART_INTERVAL,
       - V4L2_CID_JPEG_COMPRESSION_QUALITY,
       - V4L2_CID_JPEG_ACTIVE_MARKER.
      
      This covers only a part of relevant standard specifications. More
      controls should be added in future if required.
      
      The purpose of V4L2_CID_JPEG_CLASS class is also to replace some
      functionality covered by VIDIOC_S/G_JPEGCOMP ioctls, i.e. the JPEG
      markers presence and compression quality control. The applications
      and drivers should switch from the ioctl to control based API, as
      described in the subsequent patches for the Media API DocBook.
      Signed-off-by: NSylwester Nawrocki <s.nawrocki@samsung.com>
      Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
      c7361ae1