1. 29 3月, 2019 1 次提交
  2. 20 3月, 2019 1 次提交
  3. 02 3月, 2019 12 次提交
  4. 18 2月, 2019 1 次提交
  5. 08 2月, 2019 3 次提交
  6. 01 2月, 2019 3 次提交
    • M
      media: vim2m: allow setting the default transaction time via parameter · f0ef022c
      Mauro Carvalho Chehab 提交于
      While there's a control to allow setting it at runtime, as the
      control handler is per file handler, only the application setting
      the m2m device can change it. As this is a custom control, it is
      unlikely that existing apps would be able to set it.
      
      Due to that, and due to the fact that v4l2-mem2mem serializes all
      accesses to a m2m device, trying to setup two GStreamer
      v4l2videoconvert instance at the same time will cause frame drops.
      
      So, add an alternate way of setting its default via a modprobe parameter.
      Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      f0ef022c
    • M
      media: vim2m: use per-file handler work queue · b3e64e5b
      Mauro Carvalho Chehab 提交于
      It doesn't make sense to have a per-device work queue, as the
      scheduler should be called per file handler. Having a single
      one causes failures if multiple streams are filtered by vim2m.
      
      So, move it to be inside the context structure.
      Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      b3e64e5b
    • M
      media: vim2m: fix driver for it to handle different fourcc formats · 8aa153f1
      Mauro Carvalho Chehab 提交于
      Despite vim2m is reporting that it supports RGB565BE and YUYV,
      that's not true.
      
      Right now, it just says that it supports both format, but it
      doesn't actually support them.
      
      Also, horizontal flip is not properly implemented. It sounds
      that it was designed to do a pseudo-horizontal flip using 8
      tiles. Yet, as it doesn't do format conversion, the result
      is a mess.
      
      I suspect that it was done this way in order to save CPU time,
      at the time of OMAP2 days.
      
      That's messy and doesn't really help if someone wants to
      use vim2m to test a pipeline.
      
      Worse than that, the unique RGB format it says it supports is
      RGB565BE, with is not supported by Gstreamer. That prevents
      practical usage of it, even for tests.
      
      So, instead, properly implement fourcc format conversions,
      adding a few more RGB formats:
      
      	- RGB and BGR with 24 bits
      	- RGB565LE (known as RGB16 at gstreamer)
      
      Also allows using any of the 5 supported formats as either
      capture or output.
      
      Note: The YUYV conversion routines are based on the conversion code
      written by Hans de Goede inside libv4lconvert (part of v4l-utils),
      released under LGPGL 2.1 (GPL 2.0 compatible).
      
      Tested all possible format combinations except for RGB565BE,
      as Gstreamer currently doesn't support it.
      Signed-off-by: NMauro Carvalho Chehab <mchehab+samsung@kernel.org>
      8aa153f1
  7. 31 1月, 2019 1 次提交
  8. 17 1月, 2019 2 次提交
  9. 08 1月, 2019 1 次提交
  10. 23 11月, 2018 2 次提交
  11. 06 11月, 2018 1 次提交
  12. 12 9月, 2018 1 次提交
  13. 11 9月, 2018 1 次提交
  14. 31 8月, 2018 2 次提交
  15. 04 7月, 2018 1 次提交
  16. 28 6月, 2018 1 次提交
  17. 30 11月, 2017 1 次提交
    • M
      media: drivers: remove "/**" from non-kernel-doc comments · cba862dc
      Mauro Carvalho Chehab 提交于
      Several comments are wrongly tagged as kernel-doc, causing
      those warnings:
      
        drivers/media/rc/st_rc.c:98: warning: No description found for parameter 'irq'
        drivers/media/rc/st_rc.c:98: warning: No description found for parameter 'data'
        drivers/media/pci/solo6x10/solo6x10-enc.c:183: warning: No description found for parameter 'solo_dev'
        drivers/media/pci/solo6x10/solo6x10-enc.c:183: warning: No description found for parameter 'ch'
        drivers/media/pci/solo6x10/solo6x10-enc.c:183: warning: No description found for parameter 'qp'
        drivers/media/usb/pwc/pwc-dec23.c:652: warning: Cannot understand  *
         on line 652 - I thought it was a doc line
        drivers/media/usb/dvb-usb/cinergyT2-fe.c:40: warning: No description found for parameter 'op'
        drivers/media/usb/dvb-usb/friio-fe.c:301: warning: Cannot understand  * (reg, val) commad list to initialize this module.
         on line 301 - I thought it was a doc line
        drivers/media/rc/streamzap.c:201: warning: No description found for parameter 'urb'
        drivers/media/rc/streamzap.c:333: warning: No description found for parameter 'intf'
        drivers/media/rc/streamzap.c:333: warning: No description found for parameter 'id'
        drivers/media/rc/streamzap.c:464: warning: No description found for parameter 'interface'
        drivers/media/i2c/ov5647.c:432: warning: Cannot understand  * @short Subdev core operations registration
         on line 432 - I thought it was a doc line
        drivers/media/usb/dvb-usb/friio.c:35: warning: No description found for parameter 'd'
        drivers/media/usb/dvb-usb/friio.c:35: warning: No description found for parameter 'addr'
        drivers/media/usb/dvb-usb/friio.c:35: warning: No description found for parameter 'wbuf'
        drivers/media/usb/dvb-usb/friio.c:35: warning: No description found for parameter 'wlen'
        drivers/media/usb/dvb-usb/friio.c:35: warning: No description found for parameter 'rbuf'
        drivers/media/usb/dvb-usb/friio.c:35: warning: No description found for parameter 'rlen'
        drivers/media/platform/vim2m.c:350: warning: No description found for parameter 'priv'
        drivers/media/dvb-frontends/tua6100.c:34: warning: cannot understand function prototype: 'struct tua6100_priv '
        drivers/media/platform/sti/hva/hva-h264.c:140: warning: cannot understand function prototype: 'struct hva_h264_stereo_video_sei '
        drivers/media/platform/sti/hva/hva-h264.c:150: warning: Cannot understand  * @frame_width: width in pixels of the buffer containing the input frame
         on line 150 - I thought it was a doc line
        drivers/media/platform/sti/hva/hva-h264.c:356: warning: Cannot understand  * @ slice_size: slice size
         on line 356 - I thought it was a doc line
        drivers/media/platform/sti/hva/hva-h264.c:369: warning: Cannot understand  * @ bitstream_size: bitstream size
         on line 369 - I thought it was a doc line
        drivers/media/platform/sti/hva/hva-h264.c:395: warning: Cannot understand  * @seq_info:  sequence information buffer
         on line 395 - I thought it was a doc line
        drivers/media/dvb-frontends/sp887x.c:137: warning: No description found for parameter 'fe'
        drivers/media/dvb-frontends/sp887x.c:137: warning: No description found for parameter 'fw'
        drivers/media/dvb-frontends/sp887x.c:287: warning: No description found for parameter 'n'
        drivers/media/dvb-frontends/sp887x.c:287: warning: No description found for parameter 'd'
        drivers/media/dvb-frontends/sp887x.c:287: warning: No description found for parameter 'quotient_i'
        drivers/media/dvb-frontends/sp887x.c:287: warning: No description found for parameter 'quotient_f'
        drivers/media/usb/ttusb-budget/dvb-ttusb-budget.c:83: warning: cannot understand function prototype: 'struct ttusb '
        drivers/media/platform/sh_veu.c:277: warning: No description found for parameter 'priv'
        drivers/media/dvb-frontends/zl10036.c:33: warning: cannot understand function prototype: 'int zl10036_debug; '
        drivers/media/dvb-frontends/zl10036.c:179: warning: No description found for parameter 'state'
        drivers/media/dvb-frontends/zl10036.c:179: warning: No description found for parameter 'frequency'
        drivers/media/platform/rcar_fdp1.c:1139: warning: No description found for parameter 'priv'
        drivers/media/platform/ti-vpe/vpe.c:933: warning: No description found for parameter 'priv'
        drivers/media/usb/gspca/ov519.c:36: warning: No description found for parameter 'fmt'
        drivers/media/usb/dvb-usb/dib0700_devices.c:3367: warning: No description found for parameter 'adap'
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      cba862dc
  18. 22 11月, 2017 1 次提交
    • K
      treewide: setup_timer() -> timer_setup() · e99e88a9
      Kees Cook 提交于
      This converts all remaining cases of the old setup_timer() API into using
      timer_setup(), where the callback argument is the structure already
      holding the struct timer_list. These should have no behavioral changes,
      since they just change which pointer is passed into the callback with
      the same available pointers after conversion. It handles the following
      examples, in addition to some other variations.
      
      Casting from unsigned long:
      
          void my_callback(unsigned long data)
          {
              struct something *ptr = (struct something *)data;
          ...
          }
          ...
          setup_timer(&ptr->my_timer, my_callback, ptr);
      
      and forced object casts:
      
          void my_callback(struct something *ptr)
          {
          ...
          }
          ...
          setup_timer(&ptr->my_timer, my_callback, (unsigned long)ptr);
      
      become:
      
          void my_callback(struct timer_list *t)
          {
              struct something *ptr = from_timer(ptr, t, my_timer);
          ...
          }
          ...
          timer_setup(&ptr->my_timer, my_callback, 0);
      
      Direct function assignments:
      
          void my_callback(unsigned long data)
          {
              struct something *ptr = (struct something *)data;
          ...
          }
          ...
          ptr->my_timer.function = my_callback;
      
      have a temporary cast added, along with converting the args:
      
          void my_callback(struct timer_list *t)
          {
              struct something *ptr = from_timer(ptr, t, my_timer);
          ...
          }
          ...
          ptr->my_timer.function = (TIMER_FUNC_TYPE)my_callback;
      
      And finally, callbacks without a data assignment:
      
          void my_callback(unsigned long data)
          {
          ...
          }
          ...
          setup_timer(&ptr->my_timer, my_callback, 0);
      
      have their argument renamed to verify they're unused during conversion:
      
          void my_callback(struct timer_list *unused)
          {
          ...
          }
          ...
          timer_setup(&ptr->my_timer, my_callback, 0);
      
      The conversion is done with the following Coccinelle script:
      
      spatch --very-quiet --all-includes --include-headers \
      	-I ./arch/x86/include -I ./arch/x86/include/generated \
      	-I ./include -I ./arch/x86/include/uapi \
      	-I ./arch/x86/include/generated/uapi -I ./include/uapi \
      	-I ./include/generated/uapi --include ./include/linux/kconfig.h \
      	--dir . \
      	--cocci-file ~/src/data/timer_setup.cocci
      
      @fix_address_of@
      expression e;
      @@
      
       setup_timer(
      -&(e)
      +&e
       , ...)
      
      // Update any raw setup_timer() usages that have a NULL callback, but
      // would otherwise match change_timer_function_usage, since the latter
      // will update all function assignments done in the face of a NULL
      // function initialization in setup_timer().
      @change_timer_function_usage_NULL@
      expression _E;
      identifier _timer;
      type _cast_data;
      @@
      
      (
      -setup_timer(&_E->_timer, NULL, _E);
      +timer_setup(&_E->_timer, NULL, 0);
      |
      -setup_timer(&_E->_timer, NULL, (_cast_data)_E);
      +timer_setup(&_E->_timer, NULL, 0);
      |
      -setup_timer(&_E._timer, NULL, &_E);
      +timer_setup(&_E._timer, NULL, 0);
      |
      -setup_timer(&_E._timer, NULL, (_cast_data)&_E);
      +timer_setup(&_E._timer, NULL, 0);
      )
      
      @change_timer_function_usage@
      expression _E;
      identifier _timer;
      struct timer_list _stl;
      identifier _callback;
      type _cast_func, _cast_data;
      @@
      
      (
      -setup_timer(&_E->_timer, _callback, _E);
      +timer_setup(&_E->_timer, _callback, 0);
      |
      -setup_timer(&_E->_timer, &_callback, _E);
      +timer_setup(&_E->_timer, _callback, 0);
      |
      -setup_timer(&_E->_timer, _callback, (_cast_data)_E);
      +timer_setup(&_E->_timer, _callback, 0);
      |
      -setup_timer(&_E->_timer, &_callback, (_cast_data)_E);
      +timer_setup(&_E->_timer, _callback, 0);
      |
      -setup_timer(&_E->_timer, (_cast_func)_callback, _E);
      +timer_setup(&_E->_timer, _callback, 0);
      |
      -setup_timer(&_E->_timer, (_cast_func)&_callback, _E);
      +timer_setup(&_E->_timer, _callback, 0);
      |
      -setup_timer(&_E->_timer, (_cast_func)_callback, (_cast_data)_E);
      +timer_setup(&_E->_timer, _callback, 0);
      |
      -setup_timer(&_E->_timer, (_cast_func)&_callback, (_cast_data)_E);
      +timer_setup(&_E->_timer, _callback, 0);
      |
      -setup_timer(&_E._timer, _callback, (_cast_data)_E);
      +timer_setup(&_E._timer, _callback, 0);
      |
      -setup_timer(&_E._timer, _callback, (_cast_data)&_E);
      +timer_setup(&_E._timer, _callback, 0);
      |
      -setup_timer(&_E._timer, &_callback, (_cast_data)_E);
      +timer_setup(&_E._timer, _callback, 0);
      |
      -setup_timer(&_E._timer, &_callback, (_cast_data)&_E);
      +timer_setup(&_E._timer, _callback, 0);
      |
      -setup_timer(&_E._timer, (_cast_func)_callback, (_cast_data)_E);
      +timer_setup(&_E._timer, _callback, 0);
      |
      -setup_timer(&_E._timer, (_cast_func)_callback, (_cast_data)&_E);
      +timer_setup(&_E._timer, _callback, 0);
      |
      -setup_timer(&_E._timer, (_cast_func)&_callback, (_cast_data)_E);
      +timer_setup(&_E._timer, _callback, 0);
      |
      -setup_timer(&_E._timer, (_cast_func)&_callback, (_cast_data)&_E);
      +timer_setup(&_E._timer, _callback, 0);
      |
       _E->_timer@_stl.function = _callback;
      |
       _E->_timer@_stl.function = &_callback;
      |
       _E->_timer@_stl.function = (_cast_func)_callback;
      |
       _E->_timer@_stl.function = (_cast_func)&_callback;
      |
       _E._timer@_stl.function = _callback;
      |
       _E._timer@_stl.function = &_callback;
      |
       _E._timer@_stl.function = (_cast_func)_callback;
      |
       _E._timer@_stl.function = (_cast_func)&_callback;
      )
      
      // callback(unsigned long arg)
      @change_callback_handle_cast
       depends on change_timer_function_usage@
      identifier change_timer_function_usage._callback;
      identifier change_timer_function_usage._timer;
      type _origtype;
      identifier _origarg;
      type _handletype;
      identifier _handle;
      @@
      
       void _callback(
      -_origtype _origarg
      +struct timer_list *t
       )
       {
      (
      	... when != _origarg
      	_handletype *_handle =
      -(_handletype *)_origarg;
      +from_timer(_handle, t, _timer);
      	... when != _origarg
      |
      	... when != _origarg
      	_handletype *_handle =
      -(void *)_origarg;
      +from_timer(_handle, t, _timer);
      	... when != _origarg
      |
      	... when != _origarg
      	_handletype *_handle;
      	... when != _handle
      	_handle =
      -(_handletype *)_origarg;
      +from_timer(_handle, t, _timer);
      	... when != _origarg
      |
      	... when != _origarg
      	_handletype *_handle;
      	... when != _handle
      	_handle =
      -(void *)_origarg;
      +from_timer(_handle, t, _timer);
      	... when != _origarg
      )
       }
      
      // callback(unsigned long arg) without existing variable
      @change_callback_handle_cast_no_arg
       depends on change_timer_function_usage &&
                           !change_callback_handle_cast@
      identifier change_timer_function_usage._callback;
      identifier change_timer_function_usage._timer;
      type _origtype;
      identifier _origarg;
      type _handletype;
      @@
      
       void _callback(
      -_origtype _origarg
      +struct timer_list *t
       )
       {
      +	_handletype *_origarg = from_timer(_origarg, t, _timer);
      +
      	... when != _origarg
      -	(_handletype *)_origarg
      +	_origarg
      	... when != _origarg
       }
      
      // Avoid already converted callbacks.
      @match_callback_converted
       depends on change_timer_function_usage &&
                  !change_callback_handle_cast &&
      	    !change_callback_handle_cast_no_arg@
      identifier change_timer_function_usage._callback;
      identifier t;
      @@
      
       void _callback(struct timer_list *t)
       { ... }
      
      // callback(struct something *handle)
      @change_callback_handle_arg
       depends on change_timer_function_usage &&
      	    !match_callback_converted &&
                  !change_callback_handle_cast &&
                  !change_callback_handle_cast_no_arg@
      identifier change_timer_function_usage._callback;
      identifier change_timer_function_usage._timer;
      type _handletype;
      identifier _handle;
      @@
      
       void _callback(
      -_handletype *_handle
      +struct timer_list *t
       )
       {
      +	_handletype *_handle = from_timer(_handle, t, _timer);
      	...
       }
      
      // If change_callback_handle_arg ran on an empty function, remove
      // the added handler.
      @unchange_callback_handle_arg
       depends on change_timer_function_usage &&
      	    change_callback_handle_arg@
      identifier change_timer_function_usage._callback;
      identifier change_timer_function_usage._timer;
      type _handletype;
      identifier _handle;
      identifier t;
      @@
      
       void _callback(struct timer_list *t)
       {
      -	_handletype *_handle = from_timer(_handle, t, _timer);
       }
      
      // We only want to refactor the setup_timer() data argument if we've found
      // the matching callback. This undoes changes in change_timer_function_usage.
      @unchange_timer_function_usage
       depends on change_timer_function_usage &&
                  !change_callback_handle_cast &&
                  !change_callback_handle_cast_no_arg &&
      	    !change_callback_handle_arg@
      expression change_timer_function_usage._E;
      identifier change_timer_function_usage._timer;
      identifier change_timer_function_usage._callback;
      type change_timer_function_usage._cast_data;
      @@
      
      (
      -timer_setup(&_E->_timer, _callback, 0);
      +setup_timer(&_E->_timer, _callback, (_cast_data)_E);
      |
      -timer_setup(&_E._timer, _callback, 0);
      +setup_timer(&_E._timer, _callback, (_cast_data)&_E);
      )
      
      // If we fixed a callback from a .function assignment, fix the
      // assignment cast now.
      @change_timer_function_assignment
       depends on change_timer_function_usage &&
                  (change_callback_handle_cast ||
                   change_callback_handle_cast_no_arg ||
                   change_callback_handle_arg)@
      expression change_timer_function_usage._E;
      identifier change_timer_function_usage._timer;
      identifier change_timer_function_usage._callback;
      type _cast_func;
      typedef TIMER_FUNC_TYPE;
      @@
      
      (
       _E->_timer.function =
      -_callback
      +(TIMER_FUNC_TYPE)_callback
       ;
      |
       _E->_timer.function =
      -&_callback
      +(TIMER_FUNC_TYPE)_callback
       ;
      |
       _E->_timer.function =
      -(_cast_func)_callback;
      +(TIMER_FUNC_TYPE)_callback
       ;
      |
       _E->_timer.function =
      -(_cast_func)&_callback
      +(TIMER_FUNC_TYPE)_callback
       ;
      |
       _E._timer.function =
      -_callback
      +(TIMER_FUNC_TYPE)_callback
       ;
      |
       _E._timer.function =
      -&_callback;
      +(TIMER_FUNC_TYPE)_callback
       ;
      |
       _E._timer.function =
      -(_cast_func)_callback
      +(TIMER_FUNC_TYPE)_callback
       ;
      |
       _E._timer.function =
      -(_cast_func)&_callback
      +(TIMER_FUNC_TYPE)_callback
       ;
      )
      
      // Sometimes timer functions are called directly. Replace matched args.
      @change_timer_function_calls
       depends on change_timer_function_usage &&
                  (change_callback_handle_cast ||
                   change_callback_handle_cast_no_arg ||
                   change_callback_handle_arg)@
      expression _E;
      identifier change_timer_function_usage._timer;
      identifier change_timer_function_usage._callback;
      type _cast_data;
      @@
      
       _callback(
      (
      -(_cast_data)_E
      +&_E->_timer
      |
      -(_cast_data)&_E
      +&_E._timer
      |
      -_E
      +&_E->_timer
      )
       )
      
      // If a timer has been configured without a data argument, it can be
      // converted without regard to the callback argument, since it is unused.
      @match_timer_function_unused_data@
      expression _E;
      identifier _timer;
      identifier _callback;
      @@
      
      (
      -setup_timer(&_E->_timer, _callback, 0);
      +timer_setup(&_E->_timer, _callback, 0);
      |
      -setup_timer(&_E->_timer, _callback, 0L);
      +timer_setup(&_E->_timer, _callback, 0);
      |
      -setup_timer(&_E->_timer, _callback, 0UL);
      +timer_setup(&_E->_timer, _callback, 0);
      |
      -setup_timer(&_E._timer, _callback, 0);
      +timer_setup(&_E._timer, _callback, 0);
      |
      -setup_timer(&_E._timer, _callback, 0L);
      +timer_setup(&_E._timer, _callback, 0);
      |
      -setup_timer(&_E._timer, _callback, 0UL);
      +timer_setup(&_E._timer, _callback, 0);
      |
      -setup_timer(&_timer, _callback, 0);
      +timer_setup(&_timer, _callback, 0);
      |
      -setup_timer(&_timer, _callback, 0L);
      +timer_setup(&_timer, _callback, 0);
      |
      -setup_timer(&_timer, _callback, 0UL);
      +timer_setup(&_timer, _callback, 0);
      |
      -setup_timer(_timer, _callback, 0);
      +timer_setup(_timer, _callback, 0);
      |
      -setup_timer(_timer, _callback, 0L);
      +timer_setup(_timer, _callback, 0);
      |
      -setup_timer(_timer, _callback, 0UL);
      +timer_setup(_timer, _callback, 0);
      )
      
      @change_callback_unused_data
       depends on match_timer_function_unused_data@
      identifier match_timer_function_unused_data._callback;
      type _origtype;
      identifier _origarg;
      @@
      
       void _callback(
      -_origtype _origarg
      +struct timer_list *unused
       )
       {
      	... when != _origarg
       }
      Signed-off-by: NKees Cook <keescook@chromium.org>
      e99e88a9
  19. 27 8月, 2017 1 次提交
    • B
      media: platform: make video_device const · 5303135c
      Bhumika Goyal 提交于
      Make these const as they are only used during a copy operation.
      Done using Coccinelle:
      
      @match disable optional_qualifier@
      identifier s;
      @@
      static struct video_device s = {...};
      
      @ref@
      position p;
      identifier match.s;
      @@
      s@p
      
      @good1@
      identifier match.s;
      expression list[3] es;
      position ref.p;
      @@
      cx88_vdev_init(es,&s@p,...)
      
      @good2@
      position ref.p;
      identifier match.s,f,c;
      expression e;
      @@
      (
      e = s@p
      |
      e = s@p.f
      |
      c(...,s@p.f,...)
      |
      c(...,s@p,...)
      )
      
      @bad depends on  !good1 && !good2@
      position ref.p;
      identifier match.s;
      @@
      s@p
      
      @depends on forall !bad disable optional_qualifier@
      identifier match.s;
      @@
      static
      + const
      struct video_device s;
      Signed-off-by: NBhumika Goyal <bhumirks@gmail.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      5303135c
  20. 20 8月, 2017 1 次提交
  21. 31 1月, 2017 1 次提交
  22. 20 9月, 2016 1 次提交