Skip to content
Permalink
Moudy-Ho/media…
Switch branches/tags

Commits on Aug 19, 2021

  1. media: platform: mtk-mdp3: Add Mediatek MDP3 driver

    This patch adds driver for Mediatek's Media Data Path ver.3 (MDP3).
    It provides the following functions:
      color transform, format conversion, resize, crop, rotate, flip
      and additional image quality enhancement.
    
    The MDP3 driver is mainly used for Google Chromebook products to
    import the new architecture to set the HW settings as shown below:
      User -> V4L2 framework
        -> MDP3 driver -> SCP (setting calculations)
          -> MDP3 driver -> CMDQ (GCE driver) -> HW
    
    Each modules' related operation control is sited in mtk-mdp3-comp.c
    Each modules' register table is defined in file with "mdp_reg_" prefix
    GCE related API, operation control  sited in mtk-mdp3-cmdq.c
    V4L2 m2m device functions are implemented in mtk-mdp3-m2m.c
    Probe, power, suspend/resume, system level functions are defined in
    mtk-mdp3-core.c
    
    Signed-off-by: Ping-Hsun Wu <ping-hsun.wu@mediatek.com>
    Signed-off-by: daoyuan huang <daoyuan.huang@mediatek.com>
    Signed-off-by: Moudy Ho <moudy.ho@mediatek.com>
    MoudyHo authored and intel-lab-lkp committed Aug 19, 2021
  2. dts: arm64: mt8183: Add Mediatek MDP3 nodes

    Add device nodes for Media Data Path 3 (MDP3) modules.
    
    Signed-off-by: Ping-Hsun Wu <ping-hsun.wu@mediatek.com>
    Signed-off-by: daoyuan huang <daoyuan.huang@mediatek.com>
    Signed-off-by: Moudy Ho <moudy.ho@mediatek.com>
    MoudyHo authored and intel-lab-lkp committed Aug 19, 2021
  3. dt-binding: mt8183: Add Mediatek MDP3 dt-bindings

    This patch adds DT binding document for Media Data Path 3 (MDP3)
    a unit in multimedia system used for scaling and color format convert.
    
    Signed-off-by: Moudy Ho <moudy.ho@mediatek.com>
    MoudyHo authored and intel-lab-lkp committed Aug 19, 2021
  4. soc: mediatek: mutex: add support for MDP

    Add functions to support MDP:
      1. Get mutex function
      2. Enable/disable mutex
      3. Enable MDP's modules
      4. Write register via CMDQ
    
    Add MDP related settings for 8183 SoC
      1. Register settings
    
    Signed-off-by: Moudy Ho <moudy.ho@mediatek.com>
    MoudyHo authored and intel-lab-lkp committed Aug 19, 2021
  5. soc: mediatek: mmsys: Add support for MDP

    Add functions to support MDP:
      1. MDP connect/disconnect functions
      2. ISP control function
      3. Write register via CMDQ
    
    Add MDP related settings for 8183 SoC
      1. Register settings
      2. MDP route table
    
    Signed-off-by: Moudy Ho <moudy.ho@mediatek.com>
    MoudyHo authored and intel-lab-lkp committed Aug 19, 2021

Commits on Aug 5, 2021

  1. Merge tag 'v5.14-rc4' into media_tree

    Linux 5.14-rc4
    
    * tag 'v5.14-rc4': (948 commits)
      Linux 5.14-rc4
      pipe: make pipe writes always wake up readers
      Revert "perf map: Fix dso->nsinfo refcounting"
      mm/memcg: fix NULL pointer dereference in memcg_slab_free_hook()
      slub: fix unreclaimable slab stat for bulk free
      mm/migrate: fix NR_ISOLATED corruption on 64-bit
      mm: memcontrol: fix blocking rstat function called from atomic cgroup1 thresholding code
      ocfs2: issue zeroout to EOF blocks
      ocfs2: fix zero out valid data
      lib/test_string.c: move string selftest in the Runtime Testing menu
      gve: Update MAINTAINERS list
      arch: Kconfig: clean up obsolete use of HAVE_IDE
      can: esd_usb2: fix memory leak
      can: ems_usb: fix memory leak
      can: usb_8dev: fix memory leak
      can: mcba_usb_start(): add missing urb->transfer_dma initialization
      can: hi311x: fix a signedness bug in hi3110_cmd()
      MAINTAINERS: add Yasushi SHOJI as reviewer for the Microchip CAN BUS Analyzer Tool driver
      scsi: fas216: Fix fall-through warning for Clang
      scsi: acornscsi: Fix fall-through warning for clang
      ...
    mchehab committed Aug 5, 2021

Commits on Aug 4, 2021

  1. media: venus: venc: add support for V4L2_CID_MPEG_VIDEO_H264_8X8_TRAN…

    …SFORM control
    
    Add support for V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM control for
    H264 high profile and constrained high profile.
    
    Signed-off-by: Mansur Alisha Shaik <mansur@codeaurora.org>
    Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Mansur Alisha Shaik authored and mchehab committed Aug 4, 2021
  2. media: venus: venc: Add support for intra-refresh period

    Add support for intra-refresh period v4l2 control and drop
    cyclic intra-refresh macroblock control in the same time.
    
    Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    svarbanov authored and mchehab committed Aug 4, 2021
  3. media: v4l2-ctrls: Add intra-refresh period control

    Add a control to set intra-refresh period.
    
    Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    svarbanov authored and mchehab committed Aug 4, 2021
  4. media: docs: ext-ctrls-codec: Document cyclic intra-refresh zero cont…

    …rol value
    
    In all drivers _CYCLIC_INTRA_REFRESH_MB default control value is zero
    which means that the macroblocks will not be intra-refreshed. Document
    this _CYCLIC_INTRA_REFRESH_MB control behaviour in control description.
    
    Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    svarbanov authored and mchehab committed Aug 4, 2021
  5. media: venus: helper: do not set constrained parameters for UBWC

    Plane constraints firmware interface is to override the default
    alignment for a given color format. By default venus hardware has
    alignments as 128x32, but NV12 was defined differently to meet
    various usecases. Compressed NV12 has always been aligned as 128x32,
    hence not needed to override the default alignment.
    
    Fixes: bc28936 ("media: venus: helpers, hfi, vdec: Set actual plane constraints to FW")
    Signed-off-by: Mansur Alisha Shaik <mansur@codeaurora.org>
    Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
    Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Mansur Alisha Shaik authored and mchehab committed Aug 4, 2021
  6. media: venus: venc: Fix potential null pointer dereference on pointer…

    … fmt
    
    Currently the call to find_format can potentially return a NULL to
    fmt and the nullpointer is later dereferenced on the assignment of
    pixmp->num_planes = fmt->num_planes.  Fix this by adding a NULL pointer
    check and returning NULL for the failure case.
    
    Addresses-Coverity: ("Dereference null return")
    
    Fixes: aaaa93e ("[media] media: venus: venc: add video encoder files")
    Signed-off-by: Colin Ian King <colin.king@canonical.com>
    Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Colin Ian King authored and mchehab committed Aug 4, 2021
  7. media: venus: hfi: fix return value check in sys_get_prop_image_versi…

    …on()
    
    In case of error, the function qcom_smem_get() returns ERR_PTR()
    and never returns NULL. The NULL test in the return value check
    should be replaced with IS_ERR().
    
    Fixes: d566e78 ("media: venus : hfi: add venus image info into smem")
    Reported-by: Hulk Robot <hulkci@huawei.com>
    Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
    Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Zhen Lei authored and mchehab committed Aug 4, 2021
  8. media: tegra-cec: Handle errors of clk_prepare_enable()

    tegra_cec_probe() and tegra_cec_resume() ignored possible errors of
    clk_prepare_enable(). The patch fixes this.
    
    Found by Linux Driver Verification project (linuxtesting.org).
    
    Signed-off-by: Evgeny Novikov <novikov@ispras.ru>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    eunovm authored and mchehab committed Aug 4, 2021
  9. media: cec-pin: rename timer overrun variables

    The cec pin timer overruns are measured in microseconds, but the variable
    names include the millisecond symbol "ms". To avoid confusion, replace
    "ms" with "us" in the variable names and printed status message.
    
    Signed-off-by: Deborah Brouwer <deborahbrouwer3563@gmail.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    dbrouwer3563 authored and mchehab committed Aug 4, 2021
  10. media: TDA1997x: report -ENOLINK after disconnecting HDMI source

    The TD1997x chip retains vper, hper and hsper register values when the
    HDMI source is disconnected. Use a different means of checking if the
    link is still valid.
    
    Signed-off-by: Krzysztof Hałasa <khalasa@piap.pl>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Krzysztof Hałasa authored and mchehab committed Aug 4, 2021
  11. media: TDA1997x: fix tda1997x_query_dv_timings() return value

    Correctly propagate the tda1997x_detect_std error value.
    
    Signed-off-by: Krzysztof Hałasa <khalasa@piap.pl>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Krzysztof Hałasa authored and mchehab committed Aug 4, 2021
  12. media: Fix cosmetic error in TDA1997x driver

    The colon isn't followed by anything here.
    
    Signed-off-by: Krzysztof Hałasa <khalasa@piap.pl>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Krzysztof Hałasa authored and mchehab committed Aug 4, 2021
  13. media: v4l2-dv-timings.c: fix wrong condition in two for-loops

    These for-loops should test against v4l2_dv_timings_presets[i].bt.width,
    not if i < v4l2_dv_timings_presets[i].bt.width. Luckily nothing ever broke,
    since the smallest width is still a lot higher than the total number of
    presets, but it is wrong.
    
    The last item in the presets array is all 0, so the for-loop must stop
    when it reaches that sentinel.
    
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Reported-by: Krzysztof Hałasa <khalasa@piap.pl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Hans Verkuil authored and mchehab committed Aug 4, 2021
  14. media: imx: add a driver for i.MX8MQ mipi csi rx phy and controller

    Add a driver to support the i.MX8MQ MIPI CSI receiver. The hardware side
    is based on
    https://source.codeaurora.org/external/imx/linux-imx/tree/drivers/media/platform/imx8/mxc-mipi-csi2_yav.c?h=imx_5.4.70_2.3.0
    
    It's built as part of VIDEO_IMX7_CSI because that's documented to support
    i.MX8M platforms. This driver adds i.MX8MQ support where currently only the
    i.MX8MM platform has been supported.
    
    Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
    Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    merge authored and mchehab committed Aug 4, 2021
  15. media: dt-bindings: media: document the nxp,imx8mq-mipi-csi2 receiver…

    … phy and controller
    
    The i.MX8MQ SoC integrates a different MIPI CSI receiver as the i.MX8MM so
    describe the DT bindings for it.
    
    Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
    Reviewed-by: Rob Herring <robh@kernel.org>
    Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    merge authored and mchehab committed Aug 4, 2021
  16. media: imx: imx7_mipi_csis: convert some switch cases to the default

    Static analysis reports this false positive
    imx7-mipi-csis.c:1027:2: warning: 4th function call argument is
      an uninitialized value
    
    The variable 'align' is falsely reported as uninitialized.
    Even though all the cases are covered in the
    	switch (csis_fmt->width % 8) {
    
    Because there is no default case, it is reported as uninialized.
    
    Improve the switch by converting the most numerous set of cases
    to the default and silence the false positive.
    
    Signed-off-by: Tom Rix <trix@redhat.com>
    Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
    Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    trixirt authored and mchehab committed Aug 4, 2021
  17. media: imx: imx7-media-csi: Fix buffer return upon stream start failure

    When the stream fails to start, the first two buffers in the queue have
    been moved to the active_vb2_buf array and are returned to vb2 by
    imx7_csi_dma_unsetup_vb2_buf(). The function is called with the buffer
    state set to VB2_BUF_STATE_ERROR unconditionally, which is correct when
    stopping the stream, but not when the start operation fails. In that
    case, the state should be set to VB2_BUF_STATE_QUEUED. Fix it.
    
    Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Tested-by: Martin Kepplinger <martin.kepplinger@puri.sm>
    Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    pinchartl authored and mchehab committed Aug 4, 2021
  18. media: imx: imx7-media-csi: Don't set PIXEL_BIT in CSICR1

    The PIXEL_BIT field of the CSICR1 register is documented as setting the
    Bayer data width to 10 bits, and is set by the driver for all non-YUV
    pixel formats. Test code from NXP showed that the bit shouldn't be set
    for Bayer formats, and this was confirmed by experimentation with RAW8
    capture (which doesn't work when setting the field) and RAW10 capture
    (for which setting the field doesn't seem to make a difference) on
    i.MX8MM with an OV5640 sensor connected over CSI-2. Don't set it.
    
    Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
    Tested-by: Martin Kepplinger <martin.kepplinger@puri.sm>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    pinchartl authored and mchehab committed Aug 4, 2021
  19. media: imx: imx7-media-csi: Set TWO_8BIT_SENSOR for >= 10-bit formats

    Sample code from NXP, as well as experiments on i.MX8MM with RAW10
    capture with an OV5640 sensor connected over CSI-2, showed that the
    TWO_8BIT_SENSOR field of the CSICR3 register needs to be set for formats
    larger than 8 bits. Do so, even if the reference manual doesn't clearly
    describe the effect of the field.
    
    Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Tested-by: Martin Kepplinger <martin.kepplinger@puri.sm>
    Reviewed-by: Rui Miguel Silva <rmfrfs@gmail.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    pinchartl authored and mchehab committed Aug 4, 2021
  20. media: dt-bindings: media: nxp,imx7-csi: Add i.MX8MM support

    The i.MX8MM integrates a CSI bridge IP core, as the i.MX7. There seems
    to be no difference between the two SoCs according to the reference
    manual, but as documentation may not be accurate, add a compatible
    string for the i.MX8MM, with a fallback on the compatible i.MX7.
    
    Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Reviewed-by: Rob Herring <robh@kernel.org>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    pinchartl authored and mchehab committed Aug 4, 2021
  21. media: imx258: Limit the max analogue gain to 480

    The range for analog gain mentioned in the datasheet is [0, 480].
    The real gain formula mentioned in the datasheet is:
    
    	Gain = 512 / (512 – X)
    
    Hence, values larger than 511 clearly makes no sense. The gain
    register field is also documented to be of 9-bits in the datasheet.
    
    Certainly, it is enough to infer that, the kernel driver currently
    advertises an arbitrary analog gain max. Fix it by rectifying the
    value as per the data sheet i.e. 480.
    
    Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Umang Jain authored and mchehab committed Aug 4, 2021
  22. media: imx258: Rectify mismatch of VTS value

    The frame_length_lines (0x0340) registers are hard-coded as follows:
    
    - 4208x3118
      frame_length_lines = 0x0c50
    
    - 2104x1560
      frame_length_lines = 0x0638
    
    - 1048x780
      frame_length_lines = 0x034c
    
    The driver exposes the V4L2_CID_VBLANK control in read-only mode and
    sets its value to vts_def - height, where vts_def is a mode-dependent
    value coming from the supported_modes array. It is set using one of
    the following macros defined in the driver:
    
      #define IMX258_VTS_30FPS                0x0c98
      #define IMX258_VTS_30FPS_2K             0x0638
      #define IMX258_VTS_30FPS_VGA            0x034c
    
    There's a clear mismatch in the value for the full resolution mode i.e.
    IMX258_VTS_30FPS. Fix it by rectifying the macro with the value set for
    the frame_length_lines register as stated above.
    
    Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
    Reviewed-by: Bingbu Cao <bingbu.cao@intel.com>
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    pinchartl authored and mchehab committed Aug 4, 2021
  23. media: ov8856: ignore gpio and regulator for ov8856 with ACPI

    For ov8856 working with ACPI, it does not depend on the reset gpio
    and regulator to do reset and power control, so should get the gpio
    and regulator for non-ACPI cases only, otherwise it will break ov8856
    with ACPI.
    
    [Sakari Ailus: Wrap a line over 80 chars.]
    
    Signed-off-by: Bingbu Cao <bingbu.cao@intel.com>
    Signed-off-by: Tianshu Qiu <tian.shu.qiu@intel.com>
    Cc: Robert Foss <robert.foss@linaro.org>
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    bingbucao authored and mchehab committed Aug 4, 2021
  24. media: ov9734: use group write for digital gain

    As the RGB digital gains of ov9734 were not applied as group, some
    artifacts were observed in low light environment, use group write for
    digital gain can make the RGB digital can be guaranteed to applied
    together at frame boundary.
    
    Signed-off-by: Bingbu Cao <bingbu.cao@intel.com>
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    bingbucao authored and mchehab committed Aug 4, 2021
  25. media: ov2740: use group write for digital gain

    As the RGB digital gains of ov2740 were not applied as group, some
    artifacts were observed in low light environment, use group write for
    digital gain can make the RGB digital can be guaranteed to applied
    together at frame boundary.
    
    Signed-off-by: Bingbu Cao <bingbu.cao@intel.com>
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    bingbucao authored and mchehab committed Aug 4, 2021
  26. media: v4l2-flash: Check whether setting LED brightness succeeded

    Setting LED brightness may return an error but the return value was never
    checked by the V4L2 flash LED class. Do it now.
    
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Sakari Ailus authored and mchehab committed Aug 4, 2021
  27. media: v4l2-flash: Add sanity checks for flash and indicator controls

    The V4L2 flash API supports combinations of indicator and flash LEDs. Due
    to this, there's a fair amount of code that deals with all the possible
    options and just reading one part of the file doesn't really tell which
    combinations are really possible.
    
    Make the checks more explicit to keep static analysers happy and to make
    the code more resilient to future mishaps.
    
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Sakari Ailus authored and mchehab committed Aug 4, 2021
  28. media: ccs: Implement support for manual LP control

    Use the pre_streamon callback to transition the transmitter to either
    LP-11 or LP-111 mode if supported by the sensor.
    
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Sakari Ailus authored and mchehab committed Aug 4, 2021
  29. media: v4l: subdev: Add pre_streamon and post_streamoff callbacks

    Add pre_streamon and post_streamoff callbacks that can be used to set a
    CSI-2 transmitter to LP-11 or LP-111 mode. This can be used by receiver
    drivers to reliably initialise the receiver when its initialisation
    requires software involvement.
    
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Sakari Ailus authored and mchehab committed Aug 4, 2021
Older