22 Sep, 2016

3 commits

  • 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: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • Shorten the tables by removing row numbers in comments, allowing for
    later insertion of rows with minimal diffs.

    All changes have been generated by the following script.

    import io
    import re
    import sys

    def process_table(fname, data):
    if fname.endswith('hist-v4l2.rst'):
    data = re.sub(u'\n{1,2}\t( ?) -( ?) ?', u'\n\t\\1 -\\2', data, flags = re.MULTILINE)
    data = re.sub(u'\n(\t| )- \.\. row [0-9]+\n\t ?-( ?) ?', u'\\1* -\\2', data, flags = re.MULTILINE)
    else:
    data = re.sub(u'\n{1,2} -( ?) ?', u'\n -\\1', data, flags = re.MULTILINE)
    data = re.sub(u'(\n?)(\n\n - \.\. row 1\n)', u'\n\\2', data, flags = re.MULTILINE)
    data = re.sub(u'\n - \.\. row [0-9]+\n -( ?) ?', u' * -\\1', data, flags = re.MULTILINE)
    data = re.sub(u'\n - \.\. row [0-9]+\n \.\. (_[A-Z0-9_`-]*:)', u'\n - .. \\1', data, flags = re.MULTILINE)
    data = re.sub(u'\n - \.\. (_[A-Z0-9_`-]*:)\n -', u' * .. \\1\n\n -', data, flags = re.MULTILINE)
    data = re.sub(u'^ - ', u' -', data, flags = re.MULTILINE)
    data = re.sub(u'^(\t{1,2}) ', u'\\1', data, flags = re.MULTILINE)

    return data

    def process_file(fname, data):
    buf = io.StringIO(data)
    output = ''
    in_table = False
    table_separator = 0

    for line in buf.readlines():
    if line.find('.. flat-table::') != -1:
    in_table = True
    table = ''
    elif in_table and not re.match('^[\t\n]|( )', line):
    in_table = False
    output += process_table(fname, table)

    if in_table:
    table += line
    else:
    output += line

    if in_table:
    in_table = False
    output += process_table(fname, table)

    return output

    fname = sys.argv[1]

    data = file(fname, 'rb').read().decode('utf-8')
    data = process_file(fname, data)
    file(fname, 'wb').write(data.encode('utf-8'))

    Signed-off-by: Laurent Pinchart

    Laurent Pinchart
     
  • Fix a few indentation issues to enable automated table reorganization
    by a regex-based script.

    Signed-off-by: Laurent Pinchart
    Signed-off-by: Mauro Carvalho Chehab

    Laurent Pinchart
     

20 Sep, 2016

37 commits

  • Merge back from docs-next in order to get the cdomain extension.

    With such extension, the number of warnings when building docs
    in nitpick mode reduced from 22 to 2 warnings.

    * docs-next/docs-next:
    docs/driver-model: fix typo
    DMA-API-HOWTO: is no more
    doc-rst:c-domain: function-like macros arguments
    doc-rst:c-domain: fix sphinx version incompatibility
    Documentation/filesystems: Fixed typo
    docs: Don't format internal MPT docs
    docs: split up serial-interfaces.rst
    docs: Pull the HSI documentation together
    docs: Special-case function-pointer parameters in kernel-doc
    docs: make kernel-doc handle varargs properly
    x86: fix memory ranges in mm documentation
    documentation/scsi: Remove nodisconnect parameter
    doc: ioctl: Add some clarifications to botching-up-ioctls
    docs: split up the driver book
    Docs: sphinxify device-drivers.tmpl

    Mauro Carvalho Chehab
     
  • Signed-off-by: Ulrich Hecht
    Acked-by: Laurent Pinchart
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Ulrich Hecht
     
  • Adds G_EDID and S_EDID.

    Signed-off-by: Ulrich Hecht
    Acked-by: Niklas Söderlund
    Acked-by: Laurent Pinchart
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Ulrich Hecht
     
  • The driver is maintained and supported, document it as such.

    Signed-off-by: Niklas Söderlund
    Acked-by: Laurent Pinchart
    Acked-by: Simon Horman
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Niklas Söderlund
     
  • The HW can capture both ODD and EVEN fields in separate buffers so it's
    possible to support V4L2_FIELD_ALTERNATE. This patch add support for
    this mode.

    At probe time and when S_STD is called the driver will default to use
    V4L2_FIELD_INTERLACED if the subdevice reports V4L2_FIELD_ALTERNATE. The
    driver will only change the field type if the subdevice implements
    G_STD, if not it will keep the default at V4L2_FIELD_ALTERNATE.

    The user can always explicitly ask for V4L2_FIELD_ALTERNATE in S_FMT and
    the driver will use that field format.

    Signed-off-by: Niklas Söderlund
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Niklas Söderlund
     
  • The height used for V4L2_FIELD_TOP and V4L2_FIELD_BOTTOM where wrong.
    The frames only contain one field so the height should be half of the
    frame.

    Signed-off-by: Niklas Söderlund
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Niklas Söderlund
     
  • It was not possible to scale beyond the image size of the video source
    limitation. The output frame would be bigger but the captured image was
    limited to the size of the video source.

    The error was that the crop boundary was set after the requested frame
    size and not the video source size. This patch breaks out the resetting
    of the crop, compose and format to separate functions so the error wont
    creep back.

    Signed-off-by: Niklas Söderlund
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Niklas Söderlund
     
  • The driver forced whatever field was set by the source subdevice to be
    used. This patch allows the user to change from the default field.

    Signed-off-by: Niklas Söderlund
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Niklas Söderlund
     
  • The field V4L2_FIELD_INTERLACED is standard dependent and should not
    unconditionally be equivalent to V4L2_FIELD_INTERLACED_TB.

    This patch adds a check to see if the video standard can be obtained and
    if it's a 60 Hz format. If the condition is met V4L2_FIELD_INTERLACED
    is treated as V4L2_FIELD_INTERLACED_BT if not as
    V4L2_FIELD_INTERLACED_TB.

    Signed-off-by: Niklas Söderlund
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Niklas Söderlund
     
  • If the V4L2_SUBDEV_FORMAT_TRY is used in set_fmt the width, height etc
    would not be filled.

    Signed-off-by: Niklas Söderlund
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Niklas Söderlund
     
  • The media bus format reported by the adv7180 is wrong. Steve Longerbeam
    posted a patch which changed the format to UYVY8_2X8 with the commit
    message:

    Change the media bus format from YUYV8_2X8 to UYVY8_2X8. Colors
    now look correct when capturing with the i.mx6 backend. The other
    option is to set the SWPC bit in register 0x27 to swap the Cr and Cb
    output samples.

    The rcar-vin driver was developed and tested with the adv7180 and
    therefor suffers from the same issue, looking for the wrong media bus
    format. The two errors corrected each other.

    This patch takes Steve's patch and merge it with a fix for rcar-vin
    driver. The rcar-vin driver is used used in together with the adv7180
    och Koelsch and this ensures it will not break while fixing the adv7180
    issue. I checked wit Steve and he was fine with me merging the patches.

    ADV7180 parts:

    Signed-off-by: Niklas Söderlund
    Suggested-by: Steve Longerbeam
    Signed-off-by: Steve Longerbeam
    Acked-by: Lars-Peter Clausen
    Tested-by: Tim Harvey
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Niklas Söderlund
     
  • This driver has been replaced by the non-soc-camera rcar-vin driver.
    The soc-camera framework is being deprecated, so drop this older
    rcar-vin driver in favor of the newer version that does not rely on
    this deprecated framework.

    Signed-off-by: Hans Verkuil
    Cc: Guennadi Liakhovetski
    Cc: Niklas Söderlund
    Acked-by: Laurent Pinchart
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • drivers/media/platform/sti/hva/hva-v4l2.c:43:22: warning: symbol 'hva_encoders' was not declared. Should it be static?
    drivers/media/platform/sti/hva/hva-v4l2.c:1401:24: warning: symbol 'hva_driver' was not declared. Should it be static?

    Make these static.

    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • These structures are only used to copy into other structures, so declare
    them as const.

    The semantic patch that makes this change is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @r disable optional_qualifier@
    identifier i;
    position p;
    @@
    static struct dvb_tuner_ops i@p = { ... };

    @ok1@
    identifier r.i;
    expression e;
    position p;
    @@
    e = i@p

    @ok2@
    identifier r.i;
    expression e1, e2;
    position p;
    @@
    memcpy(e1, &i@p, e2)

    @bad@
    position p != {r.p,ok1.p,ok2.p};
    identifier r.i;
    struct dvb_tuner_ops e;
    @@
    e@i@p

    @depends on !bad disable optional_qualifier@
    identifier r.i;
    @@
    static
    +const
    struct dvb_tuner_ops i = { ... };
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Julia Lawall
     
  • We get 1 warning when building kernel with W=1:
    drivers/staging/media/omap4iss/iss.c:64:6: warning: no previous prototype for 'omap4iss_flush' [-Wmissing-prototypes]

    In fact, this function is only used in the file in which it is
    declared and don't need a declaration, but can be made static.
    so this patch marks this function with 'static'.

    Signed-off-by: Baoyou Xie
    Acked-by: Arnd Bergmann
    Acked-by: Laurent Pinchart
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Baoyou Xie
     
  • Trivial fix to spelling mistake in pr_warn message.

    Signed-off-by: Colin Ian King
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Colin Ian King
     
  • Trivial fix to spelling mistake in dev_err message.

    Signed-off-by: Colin Ian King
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Colin Ian King
     
  • These i2c_algorithm structures are only stored in the alg field of an
    i2c_adapter structure, which is declared as const. This declare the
    structures as const as well.

    The semantic patch that makes this change is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @r disable optional_qualifier@
    identifier i;
    position p;
    @@
    static struct i2c_algorithm i@p = { ... };

    @ok@
    identifier r.i;
    struct i2c_adapter e;
    position p;
    @@
    e.alg = &i@p;

    @bad@
    position p != {r.p,ok.p};
    identifier r.i;
    @@
    i@p

    @depends on !bad disable optional_qualifier@
    identifier r.i;
    @@
    static
    +const
    struct i2c_algorithm i = { ... };
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Julia Lawall
     
  • Add copyright lines for Zodiac who paid for the V4L touch work.

    Signed-off-by: Nick Dyer
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Nick Dyer
     
  • Building the UVC gadget into the kernel fails to build when
    CONFIG_VIDEO_V4L2 is a loadable module:

    drivers/usb/gadget/function/usb_f_uvc.o: In function `uvc_function_ep0_complete':
    uvc_configfs.c:(.text.uvc_function_ep0_complete+0x84): undefined reference to `v4l2_event_queue'
    drivers/usb/gadget/function/usb_f_uvc.o: In function `uvc_function_disable':
    uvc_configfs.c:(.text.uvc_function_disable+0x34): undefined reference to `v4l2_event_queue'

    Adding a dependency in USB_CONFIGFS_F_UVC (which is a bool symbol)
    make the 'select USB_F_UVC' statement turn the USB_F_UVC into 'm'
    whenever CONFIG_VIDEO_V4L2=m too, avoiding the link failure.

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Arnd Bergmann
     
  • The newly added atmel-isc driver uses SET_RUNTIME_PM_OPS() to
    refer to its suspend/resume functions, causing a warning when
    CONFIG_PM is not set:

    media/platform/atmel/atmel-isc.c:1477:12: error: 'isc_runtime_resume' defined but not used [-Werror=unused-function]
    media/platform/atmel/atmel-isc.c:1467:12: error: 'isc_runtime_suspend' defined but not used [-Werror=unused-function]

    This adds __maybe_unused annotations to avoid the warning without
    adding an error-prone #ifdef around it.

    Signed-off-by: Arnd Bergmann
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Arnd Bergmann
     
  • The new ad5820 driver uses #ifdef to hide the suspend/resume functions,
    but gets it wrong when CONFIG_PM_SLEEP is disabled:

    drivers/media/i2c/ad5820.c:286:12: error: 'ad5820_resume' defined but not used [-Werror=unused-function]
    drivers/media/i2c/ad5820.c:274:12: error: 'ad5820_suspend' defined but not used [-Werror=unused-function]

    This replaces the #ifdef with a __maybe_unused annotation that is
    simpler and harder to get wrong, avoiding the warning.

    Fixes: bee3d5115611 ("[media] ad5820: Add driver for auto-focus coil")

    Signed-off-by: Arnd Bergmann
    Acked-by: Pavel Machek
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Arnd Bergmann
     
  • The newly added debug mode for the synaptics-rmi4 driver relies on
    the v4l2 interface and vb2_vmalloc, but those might be configured
    as loadable modules when the driver itself is built-in, resulting
    in a link failure:

    drivers/input/rmi4/rmi_core.o: In function `rmi_f54_remove':
    rmi_f54.c:(.text.rmi_f54_remove+0x14): undefined reference to `video_unregister_device'
    rmi_f54.c:(.text.rmi_f54_remove+0x20): undefined reference to `v4l2_device_unregister'
    drivers/input/rmi4/rmi_core.o: In function `rmi_f54_vidioc_s_input':
    rmi_f54.c:(.text.rmi_f54_vidioc_s_input+0x10): undefined reference to `video_devdata'
    drivers/input/rmi4/rmi_core.o: In function `rmi_f54_vidioc_g_input':
    rmi_f54.c:(.text.rmi_f54_vidioc_g_input+0x10): undefined reference to `video_devdata'
    drivers/input/rmi4/rmi_core.o: In function `rmi_f54_vidioc_fmt':
    rmi_f54.c:(.text.rmi_f54_vidioc_fmt+0x10): undefined reference to `video_devdata'
    drivers/input/rmi4/rmi_core.o: In function `rmi_f54_vidioc_enum_input':
    rmi_f54.c:(.text.rmi_f54_vidioc_enum_input+0x10): undefined reference to `video_devdata'
    drivers/input/rmi4/rmi_core.o: In function `rmi_f54_vidioc_querycap':
    ...

    The best workaround I could come up with is to disallow the debug
    mode unless it's actually possible to call it.

    Fixes: 3a762dbd5347 ("[media] Input: synaptics-rmi4 - add support for F54 diagnostics")

    Signed-off-by: Arnd Bergmann
    Acked-by: Nick Dyer
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Arnd Bergmann
     
  • The newnly added debug mode for the atmel_mxt_ts driver relies on
    the v4l2 interface and vb2_vmalloc, but those might be configured
    as loadable modules when the driver itself is built-in, resulting
    in a link failure:

    drivers/input/touchscreen/atmel_mxt_ts.o: In function `mxt_vidioc_querycap':
    atmel_mxt_ts.c:(.text.mxt_vidioc_querycap+0x10): undefined reference to `video_devdata'
    drivers/input/touchscreen/atmel_mxt_ts.o: In function `mxt_buffer_queue':
    atmel_mxt_ts.c:(.text.mxt_buffer_queue+0x20): undefined reference to `vb2_plane_vaddr'
    atmel_mxt_ts.c:(.text.mxt_buffer_queue+0x164): undefined reference to `vb2_buffer_done'
    drivers/input/touchscreen/atmel_mxt_ts.o: In function `mxt_free_object_table':
    atmel_mxt_ts.c:(.text.mxt_free_object_table+0x18): undefined reference to `video_unregister_device'
    atmel_mxt_ts.c:(.text.mxt_free_object_table+0x20): undefined reference to `v4l2_device_unregister'

    The best workaround I could come up with is to disallow the debug
    mode unless it's actually possible to call it.

    Fixes: ecfdd7e2660e ("[media] Input: atmel_mxt_ts - output diagnostic debug via V4L2 device")

    Signed-off-by: Arnd Bergmann
    Acked-by: Nick Dyer
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Arnd Bergmann
     
  • These structures are only used to copy into other structures, so declare
    them as const.

    The semantic patch that makes this change is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @r disable optional_qualifier@
    identifier i;
    position p;
    @@
    static struct dvb_tuner_ops i@p = { ... };

    @ok1@
    identifier r.i;
    expression e;
    position p;
    @@
    e = i@p

    @ok2@
    identifier r.i;
    expression e1, e2;
    position p;
    @@
    memcpy(e1, &i@p, e2)

    @bad@
    position p != {r.p,ok1.p,ok2.p};
    identifier r.i;
    struct dvb_tuner_ops e;
    @@
    e@i@p

    @depends on !bad disable optional_qualifier@
    identifier r.i;
    @@
    static
    +const
    struct dvb_tuner_ops i = { ... };
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Julia Lawall
     
  • These structures are only used to copy into other structures, so declare
    them as const.

    The semantic patch that makes this change is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @r disable optional_qualifier@
    identifier i;
    position p;
    @@
    static struct dvb_tuner_ops i@p = { ... };

    @ok1@
    identifier r.i;
    expression e;
    position p;
    @@
    e = i@p

    @ok2@
    identifier r.i;
    expression e1, e2;
    position p;
    @@
    memcpy(e1, &i@p, e2)

    @bad@
    position p != {r.p,ok1.p,ok2.p};
    identifier r.i;
    struct dvb_tuner_ops e;
    @@
    e@i@p

    @depends on !bad disable optional_qualifier@
    identifier r.i;
    @@
    static
    +const
    struct dvb_tuner_ops i = { ... };
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Julia Lawall
     
  • For structure types defined in the same file or local header files, find
    top-level static structure declarations that have the following
    properties:
    1. Never reassigned.
    2. Address never taken
    3. Not passed to a top-level macro call
    4. No pointer or array-typed field passed to a function or stored in a
    variable.
    Declare structures having all of these properties as const.

    Done using Coccinelle.
    Based on a suggestion by Joe Perches .

    Signed-off-by: Julia Lawall
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Julia Lawall
     
  • Check for vb2_ops structures that are only stored in the ops field of a
    vb2_queue structure. That field is declared const, so vb2_ops structures
    that have this property can be declared as const also.

    The semantic patch that makes this change is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @r disable optional_qualifier@
    identifier i;
    position p;
    @@
    static struct vb2_ops i@p = { ... };

    @ok@
    identifier r.i;
    struct vb2_queue e;
    position p;
    @@
    e.ops = &i@p;

    @bad@
    position p != {r.p,ok.p};
    identifier r.i;
    struct vb2_ops e;
    @@
    e@i@p

    @depends on !bad disable optional_qualifier@
    identifier r.i;
    @@
    static
    +const
    struct vb2_ops i = { ... };
    //

    Signed-off-by: Julia Lawall
    Acked-by: Andrey Utkin
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Julia Lawall
     
  • Check for vb2_ops structures that are only stored in the ops field of a
    vb2_queue structure. That field is declared const, so vb2_ops structures
    that have this property can be declared as const also.

    The semantic patch that makes this change is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @r disable optional_qualifier@
    identifier i;
    position p;
    @@
    static struct vb2_ops i@p = { ... };

    @ok@
    identifier r.i;
    struct vb2_queue e;
    position p;
    @@
    e.ops = &i@p;

    @bad@
    position p != {r.p,ok.p};
    identifier r.i;
    struct vb2_ops e;
    @@
    e@i@p

    @depends on !bad disable optional_qualifier@
    identifier r.i;
    @@
    static
    +const
    struct vb2_ops i = { ... };
    //

    Signed-off-by: Julia Lawall
    Reviewed-by: Laurent Pinchart
    Reviewed-by: Fabien Dessenne
    Reviewed-by: Jacek Anaszewski
    Reviewed-by: Benoit Parrot
    [hans.verkuil@cisco.com: dropped soc_camera/rcar_vin.c patch because that driver will be removed]
    Signed-off-by: Hans Verkuil

    Signed-off-by: Mauro Carvalho Chehab

    Julia Lawall
     
  • Check for vb2_ops structures that are only stored in the ops field of a
    vb2_queue structure. That field is declared const, so vb2_ops structures
    that have this property can be declared as const also.

    The semantic patch that makes this change is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @r disable optional_qualifier@
    identifier i;
    position p;
    @@
    static struct vb2_ops i@p = { ... };

    @ok@
    identifier r.i;
    struct vb2_queue e;
    position p;
    @@
    e.ops = &i@p;

    @bad@
    position p != {r.p,ok.p};
    identifier r.i;
    struct vb2_ops e;
    @@
    e@i@p

    @depends on !bad disable optional_qualifier@
    identifier r.i;
    @@
    static
    +const
    struct vb2_ops i = { ... };
    //

    Signed-off-by: Julia Lawall
    Reviewed-by: Laurent Pinchart
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Julia Lawall
     
  • Allow the sub-device to be probed asynchronously so a bridge driver that's
    waiting for the device can be notified and its .bound callback executed.

    Signed-off-by: Javier Martinez Canillas
    Tested-by: H . Nikolaus Schaller
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Javier Martinez Canillas
     
  • Check for snd_pcm_ops structures that are only stored in the ops field of a
    snd_soc_platform_driver structure or passed as the third argument to
    snd_pcm_set_ops. The corresponding field or parameter is declared const,
    so snd_pcm_ops structures that have this property can be declared as const
    also.

    The semantic patch that makes this change is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @r disable optional_qualifier@
    identifier i;
    position p;
    @@
    static struct snd_pcm_ops i@p = { ... };

    @ok1@
    identifier r.i;
    struct snd_soc_platform_driver e;
    position p;
    @@
    e.ops = &i@p;

    @ok2@
    identifier r.i;
    expression e1, e2;
    position p;
    @@
    snd_pcm_set_ops(e1, e2, &i@p)

    @bad@
    position p != {r.p,ok1.p,ok2.p};
    identifier r.i;
    struct snd_pcm_ops e;
    @@
    e@i@p

    @depends on !bad disable optional_qualifier@
    identifier r.i;
    @@
    static
    +const
    struct snd_pcm_ops i = { ... };
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Julia Lawall
     
  • Check for snd_pcm_ops structures that are only stored in the ops field of a
    snd_soc_platform_driver structure or passed as the third argument to
    snd_pcm_set_ops. The corresponding field or parameter is declared const,
    so snd_pcm_ops structures that have this property can be declared as const
    also.

    The semantic patch that makes this change is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @r disable optional_qualifier@
    identifier i;
    position p;
    @@
    static struct snd_pcm_ops i@p = { ... };

    @ok1@
    identifier r.i;
    struct snd_soc_platform_driver e;
    position p;
    @@
    e.ops = &i@p;

    @ok2@
    identifier r.i;
    expression e1, e2;
    position p;
    @@
    snd_pcm_set_ops(e1, e2, &i@p)

    @bad@
    position p != {r.p,ok1.p,ok2.p};
    identifier r.i;
    struct snd_pcm_ops e;
    @@
    e@i@p

    @depends on !bad disable optional_qualifier@
    identifier r.i;
    @@
    static
    +const
    struct snd_pcm_ops i = { ... };
    //

    Signed-off-by: Julia Lawall
    Acked-by: Andrey Utkin
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Julia Lawall
     
  • Several multi-line comments added at the vsp1 patch series
    violate the Kernel CodingStyle. Fix them.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • The VYUY format isn't supported on Gen3 hardware, disable it.

    Gen2 hardware supports VYUY in practice even though the documentation
    doesn't advertise it, so keep it for Gen2 devices.

    Signed-off-by: Laurent Pinchart
    Signed-off-by: Mauro Carvalho Chehab

    Laurent Pinchart
     
  • The wpf_configure() function can be called both from IRQ and non-IRQ
    contexts, use spin_lock_irqsave().

    Signed-off-by: Laurent Pinchart
    Acked-by: Niklas Söderlund
    Signed-off-by: Mauro Carvalho Chehab

    Laurent Pinchart
     
  • Adapt vsp1_video_pipeline_run() such that it can iterate each partition
    required for constructing this frame's display list chain in the event
    that multiple display lists are required to process in hardware.

    The first display list is held as the head list object, whilst any
    following parition display lists are linked to the head by means of
    vsp1_dl_list_add_chain().

    Linking the chained display list headers to process using the auto start
    mechanism of the hardware is performed during the vsp1_dl_list_commit().

    Signed-off-by: Kieran Bingham
    Signed-off-by: Laurent Pinchart
    Reviewed-by: Niklas Söderlund
    Signed-off-by: Mauro Carvalho Chehab

    Kieran Bingham