01 Mar, 2019

14 commits


19 Feb, 2019

26 commits

  • Some kernel-doc markups are wrong. fix them.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • There are lots of warnings produced by this driver. It is not
    as much as atomisp, but it is still a lot.

    So, use the same solution to hide most of them.
    Those need to be fixed before promoting it out of staging,
    so add it at the TODO list.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • drivers/staging/media/imx/imx7-media-csi.c: In function 'imx7_csi_enum_mbus_code':
    drivers/staging/media/imx/imx7-media-csi.c:926:33: warning: variable 'in_cc' set but not used [-Wunused-but-set-variable]
    const struct imx_media_pixfmt *in_cc;
    ^~~~~

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • if imx7_csi_try_fmt() fails, outcc variable won't be
    initialized and csi->cc[IMX7_CSI_PAD_SRC] would be pointing
    to a random location.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • Commit 5964cbd86922 ("imx: Set capture compose rectangle in
    capture_device_set_format") broke the compilation of commit
    05f634040c0d ("staging/imx7: add imx7 CSI subdev driver").

    These patches came in through different pull requests and
    nobody noticed that the first changed functions that the
    second relied upon.

    Update imx7-media-csi.c accordingly.

    Signed-off-by: Hans Verkuil
    Acked-by: Rui Miguel Silva
    Signed-off-by: Mauro Carvalho Chehab

    Hans Verkuil
     
  • Add maintainer entry for the imx7 media csi, mipi csis driver,
    dt-bindings and documentation.

    Signed-off-by: Rui Miguel Silva
    Acked-by: Sakari Ailus
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Rui Miguel Silva
     
  • Add non vendor bayer formats to the allowed format array.

    Signed-off-by: Rui Miguel Silva
    Reviewed-by: Philipp Zabel
    Acked-by: Sakari Ailus
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Rui Miguel Silva
     
  • Add some i.MX7 related entries to TODO file.

    Signed-off-by: Rui Miguel Silva
    Acked-by: Sakari Ailus
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Rui Miguel Silva
     
  • Sphinx didn't like the code-blocks on this file:

    Documentation/media/v4l-drivers/imx7.rst:19: WARNING: Inline substitution_reference start-string without end-string.
    Documentation/media/v4l-drivers/imx7.rst:20: WARNING: Block quote ends without a blank line; unexpected unindent.
    Documentation/media/v4l-drivers/imx7.rst:27: WARNING: Inline substitution_reference start-string without end-string.
    Documentation/media/v4l-drivers/imx7.rst:79: WARNING: Error in "code-block" directive:
    maximum 1 argument(s) allowed, 26 supplied.

    .. code-block:: none
    # Setup links

    media-ctl -V "'csi':0 [fmt:SBGGR10_1X10/800x600 field:none]"
    Documentation/media/v4l-drivers/imx7.rst:96: WARNING: Error in "code-block" directive:
    maximum 1 argument(s) allowed, 9 supplied.

    .. code-block:: none
    .
    -> "imx7-mipi-csis.0":0 [ENABLED]

    Fix them, in order to match the expected syntax for code blocks.

    Signed-off-by: Mauro Carvalho Chehab

    Mauro Carvalho Chehab
     
  • Add rst document to describe the i.MX7 media driver and also a working
    example from the Warp7 board usage with a OV2680 sensor.

    Signed-off-by: Rui Miguel Silva
    Acked-by: Sakari Ailus
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Rui Miguel Silva
     
  • Adds MIPI CSI-2 subdev for i.MX7 to connect with sensors with a MIPI
    CSI-2 interface.

    Signed-off-by: Rui Miguel Silva
    Signed-off-by: Hans Verkuil
    [hverkuil-cisco@xs4all.nl: clean up some alignment warnings]
    Signed-off-by: Mauro Carvalho Chehab

    Rui Miguel Silva
     
  • This add the media entity subdevice and control driver for the i.MX7
    CMOS Sensor Interface.

    Signed-off-by: Rui Miguel Silva
    Acked-by: Sakari Ailus
    Signed-off-by: Hans Verkuil
    [hverkuil-cisco@xs4all.nl: clean up some alignment warnings]
    Signed-off-by: Mauro Carvalho Chehab

    Rui Miguel Silva
     
  • Add bindings documentation for i.MX7 media drivers.
    The imx7 MIPI CSI2 and imx7 CMOS Sensor Interface.

    Signed-off-by: Rui Miguel Silva
    Reviewed-by: Rob Herring
    Acked-by: Sakari Ailus
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Rui Miguel Silva
     
  • Some imx system do not have IPU, so prepare the imx media drivers to
    support this kind of devices. Rename the group ids to include an _IPU_
    prefix, add a new group id to support systems with only a CSI without
    IPU, and also rename the create internal links to make it clear that
    only systems with IPU have internal subdevices.

    Signed-off-by: Rui Miguel Silva
    Acked-by: Sakari Ailus
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Rui Miguel Silva
     
  • Refactor and move media device initialization code to a new common
    module, so it can be used by other devices, this will allow for example
    a near to introduce imx7 CSI driver, to use this media device.

    Signed-off-by: Rui Miguel Silva
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Rui Miguel Silva
     
  • smipcie: switch to RC_DRIVER_IR_RAW.

    Signed-off-by: Patrick Lerda
    Signed-off-by: Sean Young
    Signed-off-by: Mauro Carvalho Chehab

    Patrick Lerda
     
  • The Zotac RC2604323/01G and RC2604329/02BG remotes use the 32-bit
    rc6 protocol and toggle bit 15 (0x8000) on repeated button presses,
    like MCE remotes.

    Add the customer code 0x80340000 to the 32-bit rc6 toggle
    handling code to get proper scancodes and toggle reports.

    Signed-off-by: Matthias Reichl
    Signed-off-by: Sean Young
    Signed-off-by: Mauro Carvalho Chehab

    Matthias Reichl
     
  • media: add support for RCMM infrared remote controls.

    Signed-off-by: Patrick Lerda
    Signed-off-by: Sean Young
    Signed-off-by: Mauro Carvalho Chehab

    Patrick Lerda
     
  • The runtime PM of this device is enabled after v4l2_ctrl_handler_setup(),
    and this makes this device's runtime PM usage count a negative value.

    The ov7740_set_ctrl() tries to do something only if the device's runtime
    PM usage counter is nonzero.

    ov7740_set_ctrl()
    {
    if (!pm_runtime_get_if_in_use(&client->dev))
    return 0;

    ;

    pm_runtime_put(&client->dev);

    return ret;
    }

    However, the ov7740_set_ctrl() is called by v4l2_ctrl_handler_setup()
    while the runtime PM of this device is not yet enabled. In this case,
    the pm_runtime_get_if_in_use() returns -EINVAL (!= 0).

    Therefore we can't bail out of this function and the usage count is
    decreased by pm_runtime_put() without increment.

    This fixes this problem by enabling the runtime PM of this device before
    v4l2_ctrl_handler_setup() so that the ov7740_set_ctrl() is always called
    when the runtime PM is enabled.

    Cc: Wenyou Yang
    Signed-off-by: Akinobu Mita
    Tested-by: Eugen Hristev
    Signed-off-by: Sakari Ailus
    Signed-off-by: Mauro Carvalho Chehab

    Akinobu Mita
     
  • Add a flag 'FWHT_FL_I_FRAME' that indicates that
    this is an I-frame. This requires incrementing
    to version 3

    This flag is needed for the upcoming stateless FWHT
    decoder since it has to know if an encoded frame is
    an I or a P frame.

    Signed-off-by: Dafna Hirschfeld
    [hverkuil-cisco@xs4all.nl: added the last paragraph of the commit msg]
    Signed-off-by: Hans Verkuil
    Signed-off-by: Mauro Carvalho Chehab

    Dafna Hirschfeld
     
  • Since there's a v4l2_m2m_get_vq helper, use it instead of accessing the
    queue directly, which slightly increases readability.

    Also reformat the code using the queue a bit while at it.

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

    Paul Kocialkowski
     
  • Check that our queues are not busy before setting the format or return
    EBUSY if that's the case. This ensures that our format can't change
    once buffers are allocated for the queue.

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

    Paul Kocialkowski
     
  • The check to see if type is V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE is redundant
    as this has been already checked at the start of the function and if
    it's not that value then -ENOSYS is returned. Hence the sprintf can be
    replaced by a simpler string copy.

    Detected by CoverityScan, CID#1309450 ("Logically dead code")

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

    Colin Ian King
     
  • This commit changes the return type of mem2mem buffer handling API.
    Namely, these functions:

    v4l2_m2m_next_buf
    v4l2_m2m_last_buf
    v4l2_m2m_buf_remove
    v4l2_m2m_next_src_buf
    v4l2_m2m_next_dst_buf
    v4l2_m2m_last_src_buf
    v4l2_m2m_last_dst_buf
    v4l2_m2m_src_buf_remove
    v4l2_m2m_dst_buf_remove

    which currently return void pointer.

    In every case, the actual return type is a struct vb2_v4l2_buffer
    pointer. Change the return type of the listed functions,
    so type checking can be properly used.

    Signed-off-by: Ezequiel Garcia
    Signed-off-by: Hans Verkuil
    [hverkuil-cisco@xs4all.nl: clean up line-too-long checkpatch warnings]
    Signed-off-by: Mauro Carvalho Chehab

    Ezequiel Garcia
     
  • Fix the assigned type of mem2mem buffer handling API.
    Namely, these functions:

    v4l2_m2m_next_buf
    v4l2_m2m_last_buf
    v4l2_m2m_buf_remove
    v4l2_m2m_next_src_buf
    v4l2_m2m_next_dst_buf
    v4l2_m2m_last_src_buf
    v4l2_m2m_last_dst_buf
    v4l2_m2m_src_buf_remove
    v4l2_m2m_dst_buf_remove

    return a struct vb2_v4l2_buffer, and not a struct vb2_buffer.

    Fixing this is necessary to fix the mem2mem buffer handling API,
    changing the return to the correct struct vb2_v4l2_buffer instead
    of a void pointer.

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

    Ezequiel Garcia
     
  • Fix the assigned type of mem2mem buffer handling API.
    Namely, these functions:

    v4l2_m2m_next_buf
    v4l2_m2m_last_buf
    v4l2_m2m_buf_remove
    v4l2_m2m_next_src_buf
    v4l2_m2m_next_dst_buf
    v4l2_m2m_last_src_buf
    v4l2_m2m_last_dst_buf
    v4l2_m2m_src_buf_remove
    v4l2_m2m_dst_buf_remove

    return a struct vb2_v4l2_buffer, and not a struct vb2_buffer.

    Fixing this is necessary to fix the mem2mem buffer handling API,
    changing the return to the correct struct vb2_v4l2_buffer instead
    of a void pointer.

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

    Ezequiel Garcia