1. 22 3月, 2018 1 次提交
    • H
      media: add tuner standby op, use where needed · 3aab15af
      Hans Verkuil 提交于
      The v4l2_subdev core s_power op was used for two different things: power on/off
      sensors or video decoders/encoders and to put a tuner in standby (and only the
      tuner!). There is no 'tuner wakeup' op, that's done automatically when the tuner
      is accessed.
      
      The danger with calling (s_power, 0) to put a tuner into standby is that it is
      usually broadcast for all subdevs. So a video receiver subdev that supports
      s_power will also be powered off, and since there is no corresponding (s_power, 1)
      they will never be powered on again.
      
      In addition, this is specifically meant for tuners only since they draw the most
      current.
      
      This patch adds a new tuner op called 'standby' and replaces all calls to
      (core, s_power, 0) by (tuner, standby). This prevents confusion between the two
      uses of s_power. Note that there is no overlap: bridge drivers either just want
      to put the tuner into standby, or they deal with powering on/off sensors. Never
      both.
      
      This also makes it easier to replace s_power for the remaining bridge drivers
      with some PM code later.
      
      Whether we want something cleaner for tuners in the future is a separate topic.
      There is a lot of legacy code surrounding tuners, and I am very hesitant about
      making changes there.
      Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      3aab15af
  2. 08 3月, 2018 2 次提交
  3. 23 2月, 2018 1 次提交
  4. 05 1月, 2018 1 次提交
  5. 19 12月, 2017 5 次提交
  6. 01 11月, 2017 1 次提交
  7. 27 7月, 2017 1 次提交
    • A
      media: fix warning on v4l2_subdev_call() result interpreted as bool · da48c948
      Arnd Bergmann 提交于
      v4l2_subdev_call is a macro returning whatever the callback return
      type is, usually 'int'. With gcc-7 and ccache, this can lead to
      many wanings like:
      
      media/platform/pxa_camera.c: In function 'pxa_mbus_build_fmts_xlate':
      media/platform/pxa_camera.c:766:27: error: ?: using integer constants in boolean context [-Werror=int-in-bool-context]
        while (!v4l2_subdev_call(subdev, pad, enum_mbus_code, NULL, &code)) {
      media/atomisp/pci/atomisp2/atomisp_cmd.c: In function 'atomisp_s_ae_window':
      media/atomisp/pci/atomisp2/atomisp_cmd.c:6414:52: error: ?: using integer constants in boolean context [-Werror=int-in-bool-context]
        if (v4l2_subdev_call(isp->inputs[asd->input_curr].camera,
      
      The problem here is that after preprocessing, we the compiler
      sees a variation of
      
      	if (a ? 0 : 2)
      
      that it thinks is suspicious.
      
      This replaces the ?: operator with an different expression that
      does the same thing in a more easily readable way that cannot
      tigger the warning
      
      Link: https://lkml.org/lkml/2017/7/14/156Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      da48c948
  8. 09 6月, 2017 1 次提交
  9. 06 6月, 2017 2 次提交
  10. 03 2月, 2017 1 次提交
  11. 22 9月, 2016 1 次提交
    • M
      [media] get rid of a number of problems at the cross references · e383ce07
      Mauro Carvalho Chehab 提交于
      As warned by linuxdoc[1] tool, using:
      
      $ for i in $(git grep kernel-doc Documentation/media/kapi/|cut -d: -f4); do kernel-lintdoc --sloppy $i; done
      
          include/media/v4l2-dev.h:118 :WARN: function name from comment differs:  v4l2_prio_close <--> v4l2_prio_check
          include/media/v4l2-mc.h:56 [kernel-doc WARN] : enum name from comment differs:  if_vid_dec_index <--> if_vid_dec_pad_index
          include/media/v4l2-mc.h:71 [kernel-doc WARN] : enum name from comment differs:  if_aud_dec_index <--> if_aud_dec_pad_index
          include/media/v4l2-mem2mem.h:396 [kernel-doc WARN] : function name from comment differs:  v4l2_m2m_num_src_bufs_ready <--> v4l2_m2m_num_dst_bufs_ready
          drivers/media/dvb-core/dvb_math.h:28 [kernel-doc WARN] : function name from comment differs:  cintlog2 <--> intlog2
          include/media/v4l2-subdev.h:215 [kernel-doc WARN] : struct name from comment differs:  s_radio <--> v4l2_subdev_tuner_ops
          include/media/v4l2-subdev.h:890 [kernel-doc WARN] : function name from comment differs:  v4l2_set_subdevdata <--> v4l2_set_subdev_hostdata
          include/media/v4l2-subdev.h:901 [kernel-doc WARN] : function name from comment differs:  v4l2_get_subdevdata <--> v4l2_get_subdev_hostdata
          drivers/media/dvb-core/dvb_ringbuffer.h:196 [kernel-doc WARN] : function name from comment differs:  dvb_ringbuffer_writeuser <--> dvb_ringbuffer_write_user
          include/media/videobuf2-core.h:399 [kernel-doc WARN] : struct name from comment differs:  vb2_ops <--> vb2_buf_ops
          include/media/media-entity.h:132 [kernel-doc ERROR] : duplicate parameter definition 'source'
          include/media/media-entity.h:477 [kernel-doc WARN] : function name from comment differs:  media_entity_enum_test <--> media_entity_enum_test_and_set
          include/media/media-entity.h:535 [kernel-doc WARN] : function name from comment differs:  gobj_to_entity <--> gobj_to_pad
          include/media/media-entity.h:544 [kernel-doc WARN] : function name from comment differs:  gobj_to_entity <--> gobj_to_link
          include/media/media-entity.h:553 [kernel-doc WARN] : function name from comment differs:  gobj_to_entity <--> gobj_to_intf
          include/media/media-entity.h:562 [kernel-doc WARN] : function name from comment differs:  gobj_to_entity <--> intf_to_devnode
          include/media/rc-core.h:234 [kernel-doc WARN] : function name from comment differs:  rc_open <--> rc_close
          include/media/v4l2-ctrls.h:397 [kernel-doc WARN] : missing initial short description of 'v4l2_ctrl_handler_init'
          include/media/v4l2-dev.h:118 [kernel-doc WARN] : function name from comment differs:  v4l2_prio_close <--> v4l2_prio_check
          include/media/v4l2-event.h:225 [kernel-doc WARN] : missing initial short description of 'v4l2_src_change_event_subscribe'
      
      [1] https://return42.github.io/linuxdoc/linux.html
      
      The above are real issues at the documentation. On several cases,
      caused by cut-and-paste.
      
       Fix them.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      e383ce07
  12. 09 9月, 2016 3 次提交
  13. 25 8月, 2016 1 次提交
  14. 24 8月, 2016 2 次提交
  15. 23 7月, 2016 1 次提交
  16. 18 7月, 2016 1 次提交
    • M
      [media] doc-rst: Fix conversion for v4l2 core functions · 89cb3ddb
      Mauro Carvalho Chehab 提交于
      The conversion from DocBook lead into some conversion issues,
      basically due to the lack of proper support at kernel-doc.
      
      So, address them:
      
      - Now, the C files with the exported symbols also need to be
        added. So, all headers need to be included twice: one to
        get the structs/enums/.. and another one for the functions;
      
      - Notes should use the ReST tag, as kernel-doc doesn't
        recognizes it anymore;
      
      - Identation needs to be fixed, as ReST uses it to identify
        when a format "tag" ends.
      
      - kernel-doc doesn't escape things like *pointer, so we
        need to manually add a escape char before it.
      
      - On some cases, kernel-doc conversion requires violating
        the 80-cols, as otherwise it won't properly parse the
        source code.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
      89cb3ddb
  17. 12 7月, 2016 1 次提交
  18. 14 4月, 2016 1 次提交
  19. 10 2月, 2016 1 次提交
  20. 22 8月, 2015 7 次提交
    • M
      [media] v4l2-subdev: add remaining argument descriptions · 1d8955b2
      Mauro Carvalho Chehab 提交于
      Warning(.//include/media/v4l2-subdev.h:203): No description found for parameter 'ioctl'
      Warning(.//include/media/v4l2-subdev.h:203): No description found for parameter 'compat_ioctl32'
      Warning(.//include/media/v4l2-subdev.h:203): No description found for parameter 'subscribe_event'
      Warning(.//include/media/v4l2-subdev.h:203): No description found for parameter 'unsubscribe_event'
      Warning(.//include/media/v4l2-subdev.h:273): No description found for parameter 's_stream'
      Warning(.//include/media/v4l2-subdev.h:407): No description found for parameter 's_stream'
      Warning(.//include/media/v4l2-subdev.h:623): No description found for parameter 'link_validate'
      Warning(.//include/media/v4l2-subdev.h:623): No description found for parameter 'set_frame_desc'
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      Acked-by: NJonathan Corbet <corbet@lwn.net>
      1d8955b2
    • M
      [media] v4l2_subdev: describe ioctl parms at the remaining structs · e44cc20a
      Mauro Carvalho Chehab 提交于
      Fixes the following warnings:
      
      Warning(.//include/media/v4l2-subdev.h:445): No description found for parameter 'g_sliced_vbi_cap'
      Warning(.//include/media/v4l2-subdev.h:589): No description found for parameter 'enum_mbus_code'
      Warning(.//include/media/v4l2-subdev.h:589): No description found for parameter 'enum_frame_size'
      Warning(.//include/media/v4l2-subdev.h:589): No description found for parameter 'enum_frame_interval'
      Warning(.//include/media/v4l2-subdev.h:589): No description found for parameter 'get_fmt'
      Warning(.//include/media/v4l2-subdev.h:589): No description found for parameter 'set_fmt'
      Warning(.//include/media/v4l2-subdev.h:589): No description found for parameter 'get_selection'
      Warning(.//include/media/v4l2-subdev.h:589): No description found for parameter 'set_selection'
      Warning(.//include/media/v4l2-subdev.h:589): No description found for parameter 'get_edid'
      Warning(.//include/media/v4l2-subdev.h:589): No description found for parameter 'set_edid'
      Warning(.//include/media/v4l2-subdev.h:589): No description found for parameter 'dv_timings_cap'
      Warning(.//include/media/v4l2-subdev.h:589): No description found for parameter 'enum_dv_timings'
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      Acked-by: NJonathan Corbet <corbet@lwn.net>
      e44cc20a
    • M
      [media] v4l2_subdev: describe ioctl parms at v4l2_subdev_video_ops · 914728ab
      Mauro Carvalho Chehab 提交于
      Warning(.//include/media/v4l2-subdev.h:381): No description found for parameter 'g_std'
      Warning(.//include/media/v4l2-subdev.h:381): No description found for parameter 's_std'
      Warning(.//include/media/v4l2-subdev.h:381): No description found for parameter 'querystd'
      Warning(.//include/media/v4l2-subdev.h:381): No description found for parameter 'cropcap'
      Warning(.//include/media/v4l2-subdev.h:381): No description found for parameter 'g_crop'
      Warning(.//include/media/v4l2-subdev.h:381): No description found for parameter 's_crop'
      Warning(.//include/media/v4l2-subdev.h:381): No description found for parameter 'g_parm'
      Warning(.//include/media/v4l2-subdev.h:381): No description found for parameter 's_parm'
      Warning(.//include/media/v4l2-subdev.h:381): No description found for parameter 'g_frame_interval'
      Warning(.//include/media/v4l2-subdev.h:381): No description found for parameter 's_frame_interval'
      Warning(.//include/media/v4l2-subdev.h:381): No description found for parameter 's_dv_timings'
      Warning(.//include/media/v4l2-subdev.h:381): No description found for parameter 'g_dv_timings'
      Warning(.//include/media/v4l2-subdev.h:381): No description found for parameter 'query_dv_timings'
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      Acked-by: NJonathan Corbet <corbet@lwn.net>
      914728ab
    • M
      [media] v4l2-subdev: reorder the v4l2_subdev_video_ops comments · b84aeb03
      Mauro Carvalho Chehab 提交于
      The comments for struct v4l2_subdev_video_ops are out of the
      order as the parameter would appear at struct. This is not
      a problem for DocBook, but humans find harder to mentally
      reorder ;)
      
      So, put them at the right order. That makes easier to check
      what's missing, and to put the comments in the right place.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      Acked-by: NJonathan Corbet <corbet@lwn.net>
      b84aeb03
    • M
      [media] v4l2-subdev: Add description for radio ioctl handlers · 91963aae
      Mauro Carvalho Chehab 提交于
      Warning(.//include/media/v4l2-subdev.h:224): No description found for parameter 's_radio'
      Warning(.//include/media/v4l2-subdev.h:224): No description found for parameter 's_frequency'
      Warning(.//include/media/v4l2-subdev.h:224): No description found for parameter 'enum_freq_bands'
      Warning(.//include/media/v4l2-subdev.h:224): No description found for parameter 'g_tuner'
      Warning(.//include/media/v4l2-subdev.h:224): No description found for parameter 'g_modulator'
      Warning(.//include/media/v4l2-subdev.h:224): No description found for parameter 's_modulator'
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      Acked-by: NJonathan Corbet <corbet@lwn.net>
      91963aae
    • M
      [media] v4l2-subdev: Add description for core ioctl handlers · 783001ad
      Mauro Carvalho Chehab 提交于
      Warning(.//include/media/v4l2-subdev.h:183): No description found for parameter 'queryctrl'
      Warning(.//include/media/v4l2-subdev.h:183): No description found for parameter 'g_ctrl'
      Warning(.//include/media/v4l2-subdev.h:183): No description found for parameter 's_ctrl'
      Warning(.//include/media/v4l2-subdev.h:183): No description found for parameter 'g_ext_ctrls'
      Warning(.//include/media/v4l2-subdev.h:183): No description found for parameter 's_ext_ctrls'
      Warning(.//include/media/v4l2-subdev.h:183): No description found for parameter 'try_ext_ctrls'
      Warning(.//include/media/v4l2-subdev.h:183): No description found for parameter 'querymenu'
      Warning(.//include/media/v4l2-subdev.h:183): No description found for parameter 'g_register'
      Warning(.//include/media/v4l2-subdev.h:183): No description found for parameter 's_register'
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      Acked-by: NJonathan Corbet <corbet@lwn.net>
      783001ad
    • M
      [media] v4l2-subdev: convert documentation to the right format · 5c662984
      Mauro Carvalho Chehab 提交于
      struct v4l2_subdev_core_ops has some kernel-doc-nano documentation
      using a wrong format, with affects the number of stuff reported at
      the DocBook device-drivers.xml.
      
      Properly mark the such comment blocks using the right notation.
      Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
      Acked-by: NJonathan Corbet <corbet@lwn.net>
      5c662984
  21. 17 7月, 2015 1 次提交
  22. 16 6月, 2015 1 次提交
  23. 21 5月, 2015 1 次提交
  24. 01 5月, 2015 2 次提交