Skip to content
Permalink
Sakari-Ailus/V…
Switch branches/tags

Commits on Jun 22, 2021

  1. Documentation: v4l: Fix V4L2_CID_PIXEL_RATE documentation

    The V4L2_CID_PIXEL_RATE is nowadays used to tell pixel sampling rate in
    the sub-device's pixel array, not the pixel rate over a link (for which it
    also becomes unfit with the addition of multiplexed streams later on). Fix
    this.
    
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Sakari Ailus authored and intel-lab-lkp committed Jun 22, 2021
  2. media: rcar-vin: Remove explicit device availability check

    The fwnode is retrieved using fwnode_graph_get_endpoint_by_id() without
    the FWNODE_GRAPH_DEVICE_DISABLED flag set. So there is no need to
    explicitly check if the fwnode is available as it always will be when
    the check is performed, remove it.
    
    Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Niklas Söderlund authored and intel-lab-lkp committed Jun 22, 2021
  3. media: v4l2-fwnode: Simplify v4l2_async_nf_parse_fwnode_endpoints()

    There are only one user left of __v4l2_async_nf_parse_fwnode_ep()
    since [1], v4l2_async_nf_parse_fwnode_endpoints(). The two
    functions can be merged.
    
    The merge of the two highlights a dead code block conditioned by the
    argument 'has_port' that always is false and can therefor be removed.
    
    1. commit 0ae426e ("media: v4l2-fwnode: Remove v4l2_async_notifier_parse_fwnode_endpoints_by_port()")
    
    Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
    [Sakari Ailus: Aligned some lines to opening parentheses.]
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Niklas Söderlund authored and intel-lab-lkp committed Jun 22, 2021
  4. v4l: async: Rename async nf functions, clean up long lines

    Rename V4L2 async notifier functions, replacing "notifier" with "nf" and
    removing "_subdev" at the end of the function names adding subdevs as you
    can only add subdevs to a notifier. Also wrap and otherwise clean up long
    lines.
    
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Sakari Ailus authored and intel-lab-lkp committed Jun 22, 2021
  5. Documentation: media: Fix v4l2-async kerneldoc syntax

    Fix kerneldoc syntax in v4l2-async. The references were not produced
    correctly.
    
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Sakari Ailus authored and intel-lab-lkp committed Jun 22, 2021
  6. Documentation: media: Improve camera sensor documentation

    Modernise the documentation to make it more precise and update the use of
    pixel rate control and various other changes. In particular:
    
    - Use non-proportional font for file names, properties as well as
      controls.
    
    - The unit of the HBLANK control is pixels, not lines.
    
    - The unit of PIXEL_RATE control is pixels per second, not Hz.
    
    - Merge common requirements for CSI-2 and parallel busses.
    
    - Include all DT properties needed for assigned clocks.
    
    - Fix referencing the link rate control.
    
    - SMIA driver's new name is CCS driver.
    
    - The PIXEL_RATE control denotes pixel rate on the pixel array on camera
      sensors. Do not suggest it is used to tell the maximum pixel rate on the
      bus anymore.
    
    - Improve ReST syntax (plain struct and function names).
    
    - Remove the suggestion to use s_power() in receiver drivers.
    
    - Make MIPI website URL use HTTPS, add Wikipedia links to BT.601 and
      BT.656.
    
    Fixes: e4cf8c5 ("media: Documentation: media: Document how to write camera sensor drivers")
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Sakari Ailus authored and intel-lab-lkp committed Jun 22, 2021

Commits on Jun 17, 2021

  1. media: i2c: rdacm20: Re-work ov10635 reset

    The OV10635 image sensor embedded in the camera module is currently
    reset after the MAX9271 initialization with two long delays that were
    most probably not correctly characterized.
    
    Re-work the image sensor reset procedure by holding the chip in reset
    during the MAX9271 configuration, removing the long sleep delays and
    only wait after the chip exits from reset for 350-500 microseconds
    interval, which is larger than the minimum (2048 * (1 / XVCLK)) timeout
    characterized in the chip manual.
    
    Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
    Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Jacopo Mondi authored and mchehab committed Jun 17, 2021
  2. media: i2c: rdacm20: Check return values

    The camera module initialization routine does not check the return
    value of a few functions. Fix that.
    
    Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
    Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Jacopo Mondi authored and mchehab committed Jun 17, 2021
  3. media: i2c: rdacm20: Report camera module name

    When the device is identified the driver currently reports the
    names of the chips embedded in the camera module.
    
    Report the name of the camera module itself instead.
    Cosmetic change only.
    
    Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
    Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Jacopo Mondi authored and mchehab committed Jun 17, 2021
  4. media: i2c: rdacm20: Enable noise immunity

    Enable the noise immunity threshold at the end of the rdacm20
    initialization routine.
    
    The rdacm20 camera module has been so far tested with a startup
    delay that allowed the embedded MCU to program the serializer. If
    the initialization routine is run before the MCU programs the
    serializer and the image sensor and their addresses gets changed
    by the rdacm20 driver it is required to manually enable the noise
    immunity threshold to make the communication on the control channel
    more reliable.
    
    Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Jacopo Mondi authored and mchehab committed Jun 17, 2021
  5. media: i2c: rdacm20: Embed 'serializer' field

    There's no reason to allocate dynamically the 'serializer' field in
    the driver structure.
    
    Embed the field and adjust all its users in the driver.
    
    Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
    Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Jacopo Mondi authored and mchehab committed Jun 17, 2021
  6. media: i2c: rdacm21: Power up OV10640 before OV490

    The current RDACM21 initialization routine powers up the OV10640 image
    sensor after the OV490 ISP. The ISP is programmed with a firmware loaded
    from an embedded serial flash that (most probably) tries to interact and
    program also the image sensor connected to the ISP.
    
    As described in commit "media: i2c: rdacm21: Fix OV10640 powerup" the
    image sensor powerdown signal is kept high by an internal pull up
    resistor and occasionally fails to startup correctly if the powerdown
    line is not asserted explicitly. Failures in the OV10640 startup causes
    the OV490 firmware to fail to boot correctly resulting in the camera
    module initialization to fail consequentially.
    
    Fix this by powering up the OV10640 image sensor before testing the
    OV490 firmware boot completion, by splitting the ov10640_initialize()
    function in an ov10640_power_up() one and an ov10640_check_id() one.
    
    Also make sure the OV10640 identification procedure gives enough time to
    the image sensor to resume after the programming phase performed by the
    OV490 firmware by repeating the ID read procedure.
    
    This commit fixes a sporadic start-up error triggered by a failure to
    detect the OV490 firmware boot completion:
    rdacm21 8-0054: Timeout waiting for firmware boot
    
    [hverkuil: fixed two typos in commit log]
    
    Fixes: a59f853 ("media: i2c: Add driver for RDACM21 camera module")
    Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Jacopo Mondi authored and mchehab committed Jun 17, 2021
  7. media: i2c: rdacm21: Fix OV10640 powerup

    The OV10640 image sensor powerdown signal is controlled by the first
    line of the OV490 GPIO pad #1, but the pad #0 identifier
    OV490_GPIO_OUTPUT_VALUE0 was erroneously used. As a result the image
    sensor powerdown signal was never asserted but was left floating and
    kept high by an internal pull-up resistor, causing sporadic failures
    during the image sensor startup phase.
    
    Fix this by using the correct GPIO pad identifier and wait the mandatory
    1.5 millisecond delay after the powerup lane is asserted. The reset
    delay is not characterized in the chip manual if not as "255 XVCLK +
    initialization". Wait for at least 3 milliseconds to guarantee the SCCB
    bus is available.
    
    While at it also fix the reset sequence, as the reset line was released
    before the powerdown one, and the line was not cycled.
    
    This commit fixes a sporadic start-up error triggered by a failure to
    read the OV10640 chip ID:
    rdacm21 8-0054: OV10640 ID mismatch: (0x01)
    
    Fixes: a59f853 ("media: i2c: Add driver for RDACM21 camera module")
    Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
    Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Jacopo Mondi authored and mchehab committed Jun 17, 2021
  8. media: i2c: rdacm21: Add delay after OV490 reset

    Add a delay after the OV490 chip is put in reset state. The reset
    signal shall be held low for at least 250 useconds.
    
    Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Jacopo Mondi authored and mchehab committed Jun 17, 2021
  9. media: i2c: max9271: Introduce wake_up() function

    The MAX9271 chip manual prescribes a delay of 5 milliseconds
    after the chip exits from low power state.
    
    Add a new function to the max9271 library driver that wakes up the chip
    with a dummy i2c transaction and implements the correct delay of 5
    milliseconds after the chip exits from low power state.
    
    Use the newly introduced function in the rdacm20 and rdacm21 camera
    drivers. The former was not respecting the required delay while the
    latter was waiting for a too-short timeout.
    
    Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
    Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Jacopo Mondi authored and mchehab committed Jun 17, 2021
  10. media: i2c: max9271: Check max9271_write() return

    Check the return value of the max9271_write() function in the
    max9271 library driver.
    
    While at it, modify an existing condition to be made identical
    to other checks.
    
    Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
    Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Jacopo Mondi authored and mchehab committed Jun 17, 2021
  11. media: i2c: max9286: Rework comments in .bound()

    Rephrase a comment in .bound() callback to make it clear we register
    a subdev notifier and remove a redundant comment about disabling i2c
    auto-ack.
    
    No functional changes intended.
    
    Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
    Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Jacopo Mondi authored and mchehab committed Jun 17, 2021
  12. media: i2c: max9286: Define high channel amplitude

    Provide a macro to define the reverse channel amplitude to
    be used to compensate the remote serializer noise immunity.
    
    While at it, update a comment.
    
    Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
    Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Jacopo Mondi authored and mchehab committed Jun 17, 2021
  13. media: i2c: max9286: Cache channel amplitude

    Cache the current channel amplitude in a driver variable
    to skip updating it if the newly requested value is the same
    as the currently configured one.
    
    Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
    Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Jacopo Mondi authored and mchehab committed Jun 17, 2021
  14. media: i2c: max9286: Rename reverse_channel_mv

    Rename the reverse_channel_mv variable to init_rev_chan_mv as
    the next patch will cache the reverse channel amplitude in
    a new driver variable.
    
    Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
    Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Jacopo Mondi authored and mchehab committed Jun 17, 2021
  15. media: i2c: max9286: Adjust parameters indent

    The parameters to max9286_i2c_mux_configure() fits on the previous
    line. Adjust it.
    
    Cosmetic change only.
    
    Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
    Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Jacopo Mondi authored and mchehab committed Jun 17, 2021
  16. media: hantro: add support for Rockchip RK3036

    RK3036's VPU IP block is the same as RK3288 has, except that it doesn't
    have an encoder, decoding is supported up to 1920x1088 only and the axi
    clock can be set to 300 MHz max.
    
    Add a new RK3036 variant which reflects these differences.
    
    Signed-off-by: Alex Bee <knaerzche@gmail.com>
    Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    knaerzche authored and mchehab committed Jun 17, 2021
  17. media: hantro: add support for Rockchip RK3066

    RK3066's VPU IP block is the predecessor from what RK3288 has.
    The hardware differences are:
      - supports decoding frame sizes up to 1920x1088 only
      - doesn't have the 'G1_REG_SOFT_RESET' register
        (requires another .reset callback for hantro_codec_ops,
         since writing this register will result in non-working
         IP block)
      - has one ACLK/HCLK per vdpu/vepu
      - ACLKs can be clocked up to 300 MHz only
      - no MMU
        (no changes required: CMA will be transparently used)
    
    Add a new RK3066 variant which reflect this differences. This variant
    can be used for RK3188 as well.
    
    Signed-off-by: Alex Bee <knaerzche@gmail.com>
    Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    knaerzche authored and mchehab committed Jun 17, 2021
  18. media: hantro: merge Rockchip platform drivers

    Merge the two Rockchip platform drivers into one as it was suggested at
    [1] and [2].
    This will hopefully make it easier to add new variants (which are surely
    to come for Rockchip).
    Also rename from "rk3288" to "v(d/e)pu1" and "rk3399" to "v(d/e)pu2"
    where applicable, as this is the dicition the vendor uses and will
    also refelect the variants that get added later in this series. Rename
    from "rk3288" to "rockchip" if applicable to both hardware versions.
    
    [1] https://patchwork.kernel.org/project/linux-rockchip/patch/20210107134101.195426-6-paul.kocialkowski@bootlin.com/
    [2] https://patchwork.kernel.org/project/linux-rockchip/patch/20210525152225.154302-5-knaerzche@gmail.com/
    
    Signed-off-by: Alex Bee <knaerzche@gmail.com>
    Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    knaerzche authored and mchehab committed Jun 17, 2021
  19. media: hantro: reorder variants

    Reorder variants in hantro driver alphanumeric.
    
    Signed-off-by: Alex Bee <knaerzche@gmail.com>
    Reviewed-by: Ezequiel Garcia <ezequiel@collabora.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    knaerzche authored and mchehab committed Jun 17, 2021
  20. media: dt-bindings: media: rockchip-vdec: add RK3228 compatible

    Document the RK3228 compatible for rockchip-vdec.
    Also add the optional assigned-clocks and assigned-clock-rates
    properties.
    
    Signed-off-by: Alex Bee <knaerzche@gmail.com>
    Reviewed-by: Rob Herring <robh@kernel.org>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    knaerzche authored and mchehab committed Jun 17, 2021
  21. media: dt-bindings: media: rockchip-vpu: add new compatibles

    Add compatibles for RK3036, RK3066, RK3188 and RK3228. Also reflect the
    changes to the additional clocks for RK3066/RK3188.
    
    Signed-off-by: Alex Bee <knaerzche@gmail.com>
    Reviewed-by: Rob Herring <robh@kernel.org>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    knaerzche authored and mchehab committed Jun 17, 2021
  22. media: mtk-vcodec: fix kerneldoc warnings

    Fix the following kerneldoc warnings:
    
    drivers/media/platform/mtk-vcodec/venc_ipi_msg.h:31: warning: Enum value 'AP_IPIMSG_ENC_INIT' not described in enum 'venc_ipi_msg_id'
    drivers/media/platform/mtk-vcodec/venc_ipi_msg.h:31: warning: Enum value 'AP_IPIMSG_ENC_SET_PARAM' not described in enum 'venc_ipi_msg_id'
    drivers/media/platform/mtk-vcodec/venc_ipi_msg.h:31: warning: Enum value 'AP_IPIMSG_ENC_ENCODE' not described in enum 'venc_ipi_msg_id'
    drivers/media/platform/mtk-vcodec/venc_ipi_msg.h:31: warning: Enum value 'AP_IPIMSG_ENC_DEINIT' not described in enum 'venc_ipi_msg_id'
    drivers/media/platform/mtk-vcodec/venc_ipi_msg.h:31: warning: Enum value 'VPU_IPIMSG_ENC_INIT_DONE' not described in enum 'venc_ipi_msg_id'
    drivers/media/platform/mtk-vcodec/venc_ipi_msg.h:31: warning: Enum value 'VPU_IPIMSG_ENC_SET_PARAM_DONE' not described in enum 'venc_ipi_msg_id'
    drivers/media/platform/mtk-vcodec/venc_ipi_msg.h:31: warning: Enum value 'VPU_IPIMSG_ENC_ENCODE_DONE' not described in enum 'venc_ipi_msg_id'
    drivers/media/platform/mtk-vcodec/venc_ipi_msg.h:31: warning: Enum value 'VPU_IPIMSG_ENC_DEINIT_DONE' not described in enum 'venc_ipi_msg_id'
    drivers/media/platform/mtk-vcodec/venc_ipi_msg.h:31: warning: Excess enum value 'VPU_IPIMSG_ENC_XXX_DONE' description in 'venc_ipi_msg_id'
    drivers/media/platform/mtk-vcodec/venc_ipi_msg.h:31: warning: Excess enum value 'AP_IPIMSG_ENC_XXX' description in 'venc_ipi_msg_id'
    drivers/media/platform/mtk-vcodec/venc_ipi_msg.h:120: warning: Enum value 'VENC_IPI_MSG_STATUS_OK' not described in enum 'venc_ipi_msg_status'
    drivers/media/platform/mtk-vcodec/venc_ipi_msg.h:120: warning: Enum value 'VENC_IPI_MSG_STATUS_FAIL' not described in enum 'venc_ipi_msg_status'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:50: warning: Enum value 'VDEC_SYS' not described in enum 'mtk_hw_reg_idx'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:50: warning: Enum value 'VDEC_MISC' not described in enum 'mtk_hw_reg_idx'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:50: warning: Enum value 'VDEC_LD' not described in enum 'mtk_hw_reg_idx'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:50: warning: Enum value 'VDEC_TOP' not described in enum 'mtk_hw_reg_idx'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:50: warning: Enum value 'VDEC_CM' not described in enum 'mtk_hw_reg_idx'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:50: warning: Enum value 'VDEC_AD' not described in enum 'mtk_hw_reg_idx'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:50: warning: Enum value 'VDEC_AV' not described in enum 'mtk_hw_reg_idx'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:50: warning: Enum value 'VDEC_PP' not described in enum 'mtk_hw_reg_idx'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:50: warning: Enum value 'VDEC_HWD' not described in enum 'mtk_hw_reg_idx'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:50: warning: Enum value 'VDEC_HWQ' not described in enum 'mtk_hw_reg_idx'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:50: warning: Enum value 'VDEC_HWB' not described in enum 'mtk_hw_reg_idx'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:50: warning: Enum value 'VDEC_HWG' not described in enum 'mtk_hw_reg_idx'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:50: warning: Enum value 'NUM_MAX_VDEC_REG_BASE' not described in enum 'mtk_hw_reg_idx'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:50: warning: Enum value 'VENC_SYS' not described in enum 'mtk_hw_reg_idx'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:50: warning: Enum value 'VENC_LT_SYS' not described in enum 'mtk_hw_reg_idx'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:50: warning: Enum value 'NUM_MAX_VCODEC_REG_BASE' not described in enum 'mtk_hw_reg_idx'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:58: warning: Enum value 'MTK_INST_DECODER' not described in enum 'mtk_instance_type'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:58: warning: Enum value 'MTK_INST_ENCODER' not described in enum 'mtk_instance_type'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:87: warning: Enum value 'MTK_ENCODE_PARAM_NONE' not described in enum 'mtk_encode_param'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:87: warning: Enum value 'MTK_ENCODE_PARAM_BITRATE' not described in enum 'mtk_encode_param'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:87: warning: Enum value 'MTK_ENCODE_PARAM_FRAMERATE' not described in enum 'mtk_encode_param'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:87: warning: Enum value 'MTK_ENCODE_PARAM_INTRA_PERIOD' not described in enum
    'mtk_encode_param'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:87: warning: Enum value 'MTK_ENCODE_PARAM_FORCE_INTRA' not described in enum
    'mtk_encode_param'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:87: warning: Enum value 'MTK_ENCODE_PARAM_GOP_SIZE' not described in enum 'mtk_encode_param'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:103: warning: Function parameter or member 'fourcc' not described in 'mtk_video_fmt'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:103: warning: Function parameter or member 'type' not described in 'mtk_video_fmt'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:103: warning: Function parameter or member 'num_planes' not described in 'mtk_video_fmt'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:103: warning: Function parameter or member 'flags' not described in 'mtk_video_fmt'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:112: warning: Function parameter or member 'fourcc' not described in 'mtk_codec_framesizes'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:112: warning: Function parameter or member 'stepwise' not described in 'mtk_codec_framesizes'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:120: warning: Enum value 'MTK_Q_DATA_SRC' not described in enum 'mtk_q_type'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:120: warning: Enum value 'MTK_Q_DATA_DST' not described in enum 'mtk_q_type'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:134: warning: Function parameter or member 'visible_width' not described in 'mtk_q_data'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:134: warning: Function parameter or member 'visible_height' not described in 'mtk_q_data'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:134: warning: Function parameter or member 'coded_width' not described in 'mtk_q_data'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:134: warning: Function parameter or member 'coded_height' not described in 'mtk_q_data'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:134: warning: Function parameter or member 'field' not described in 'mtk_q_data'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:134: warning: Function parameter or member 'bytesperline' not described in 'mtk_q_data'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:134: warning: Function parameter or member 'sizeimage' not described in 'mtk_q_data'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:134: warning: Function parameter or member 'fmt' not described in 'mtk_q_data'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:177: warning: Function parameter or member 'clk_name' not described in 'mtk_vcodec_clk_info'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:177: warning: Function parameter or member 'vcodec_clk' not described in
    'mtk_vcodec_clk_info'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:185: warning: Function parameter or member 'clk_info' not described in 'mtk_vcodec_clk'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:185: warning: Function parameter or member 'clk_num' not described in 'mtk_vcodec_clk'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:198: warning: Function parameter or member 'vdec_clk' not described in 'mtk_vcodec_pm'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:198: warning: Function parameter or member 'larbvdec' not described in 'mtk_vcodec_pm'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:198: warning: Function parameter or member 'venc_clk' not described in 'mtk_vcodec_pm'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:198: warning: Function parameter or member 'larbvenc' not described in 'mtk_vcodec_pm'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:198: warning: Function parameter or member 'dev' not described in 'mtk_vcodec_pm'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:198: warning: Function parameter or member 'mtkdev' not described in 'mtk_vcodec_pm'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:300: warning: Function parameter or member 'decoded_frame_cnt' not described in
    'mtk_vcodec_ctx'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:332: warning: Function parameter or member 'min_bitrate' not described in
    'mtk_vcodec_enc_pdata'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:405: warning: Function parameter or member 'venc_pdata' not described in 'mtk_vcodec_dev'
    drivers/media/platform/mtk-vcodec/mtk_vcodec_drv.h:405: warning: Function parameter or member 'decode_workqueue' not described in
    'mtk_vcodec_dev'
    drivers/media/platform/mtk-vcodec/vdec_ipi_msg.h:27: warning: Enum value 'AP_IPIMSG_DEC_INIT' not described in enum 'vdec_ipi_msgid'
    drivers/media/platform/mtk-vcodec/vdec_ipi_msg.h:27: warning: Enum value 'AP_IPIMSG_DEC_START' not described in enum 'vdec_ipi_msgid'
    drivers/media/platform/mtk-vcodec/vdec_ipi_msg.h:27: warning: Enum value 'AP_IPIMSG_DEC_END' not described in enum 'vdec_ipi_msgid'
    drivers/media/platform/mtk-vcodec/vdec_ipi_msg.h:27: warning: Enum value 'AP_IPIMSG_DEC_DEINIT' not described in enum 'vdec_ipi_msgid'
    drivers/media/platform/mtk-vcodec/vdec_ipi_msg.h:27: warning: Enum value 'AP_IPIMSG_DEC_RESET' not described in enum 'vdec_ipi_msgid'
    drivers/media/platform/mtk-vcodec/vdec_ipi_msg.h:27: warning: Enum value 'VPU_IPIMSG_DEC_INIT_ACK' not described in enum 'vdec_ipi_msgid'
    drivers/media/platform/mtk-vcodec/vdec_ipi_msg.h:27: warning: Enum value 'VPU_IPIMSG_DEC_START_ACK' not described in enum 'vdec_ipi_msgid'
    drivers/media/platform/mtk-vcodec/vdec_ipi_msg.h:27: warning: Enum value 'VPU_IPIMSG_DEC_END_ACK' not described in enum 'vdec_ipi_msgid'
    drivers/media/platform/mtk-vcodec/vdec_ipi_msg.h:27: warning: Enum value 'VPU_IPIMSG_DEC_DEINIT_ACK' not described in enum 'vdec_ipi_msgid'
    drivers/media/platform/mtk-vcodec/vdec_ipi_msg.h:27: warning: Enum value 'VPU_IPIMSG_DEC_RESET_ACK' not described in enum 'vdec_ipi_msgid'
    drivers/media/platform/mtk-vcodec/vdec_ipi_msg.h:27: warning: Excess enum value 'AP_IPIMSG_XXX' description in 'vdec_ipi_msgid'
    drivers/media/platform/mtk-vcodec/vdec_ipi_msg.h:27: warning: Excess enum value 'VPU_IPIMSG_XXX_ACK' description in 'vdec_ipi_msgid'
    
    In some cases I just changed /** to /*, in other cases the missing
    field descriptions were added.
    
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Hans Verkuil authored and mchehab committed Jun 17, 2021
  23. media: adv7842: remove spurious & and fix vga_edid size

    No need to use & to get the start address of an array.
    
    Fix the size of vga_edid.edid to a single block (128 bytes) to fix
    this smatch error:
    
    adv7842.c:2538 adv7842_set_edid() error: memcpy() '&state->vga_edid.edid' too small (128 vs 512)
    
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Hans Verkuil authored and mchehab committed Jun 17, 2021
  24. media: pci: cx88: switch from 'pci_' to 'dma_' API

    The wrappers in include/linux/pci-dma-compat.h should go away.
    
    The patch has been generated with the coccinelle script below and has been
    hand modified to replace GFP_ with a correct flag.
    It has been compile tested.
    
    Only 2 functions allocate some memory. They are both in cx88-core.c
    
    When memory is allocated in 'cx88_risc_buffer()', GFP_KERNEL can be
    used because its 2 callers end up to '.buf_prepare' functions in 'vb2_ops'
    structures.
    The call chains are:
    
      .buf_prepare                   (cx88-vbi.c)
        --> buffer_prepare           (cx88-vbi.c)
          --> cx88_risc_buffer
    
      .buf_prepare                   (cx88-video.c)
        --> buffer_prepare           (cx88-video.c)
          --> cx88_risc_buffer
    
    When memory is allocated in 'cx88_risc_databuffer()', GFP_KERNEL can be
    used because its 2 callers end up to 'snd_cx88_hw_params' which already
    uses GFP_KERNEL and '.buf_prepare' functions in 'vb2_ops' structures.
    The call chains are:
    
      snd_cx88_hw_params                   (cx88-alsa.c)
        --> cx88_risc_databuffer
    
      .buf_prepare                         (cx88-blackbird.c)
        --> buffer_prepare                 (cx88-blackbird.c)
          --> cx8802_buf_prepare           (cx88-mpeg.c)
            --> cx88_risc_databuffer
    
      .buf_prepare                         (cx88-dvb.c)
        --> buffer_prepare                 (cx88-dvb.c)
          --> cx8802_buf_prepare           (cx88-mpeg.c)
            --> cx88_risc_databuffer
    
    @@ @@
    -    PCI_DMA_BIDIRECTIONAL
    +    DMA_BIDIRECTIONAL
    
    @@ @@
    -    PCI_DMA_TODEVICE
    +    DMA_TO_DEVICE
    
    @@ @@
    -    PCI_DMA_FROMDEVICE
    +    DMA_FROM_DEVICE
    
    @@ @@
    -    PCI_DMA_NONE
    +    DMA_NONE
    
    @@
    expression e1, e2, e3;
    @@
    -    pci_alloc_consistent(e1, e2, e3)
    +    dma_alloc_coherent(&e1->dev, e2, e3, GFP_)
    
    @@
    expression e1, e2, e3;
    @@
    -    pci_zalloc_consistent(e1, e2, e3)
    +    dma_alloc_coherent(&e1->dev, e2, e3, GFP_)
    
    @@
    expression e1, e2, e3, e4;
    @@
    -    pci_free_consistent(e1, e2, e3, e4)
    +    dma_free_coherent(&e1->dev, e2, e3, e4)
    
    @@
    expression e1, e2, e3, e4;
    @@
    -    pci_map_single(e1, e2, e3, e4)
    +    dma_map_single(&e1->dev, e2, e3, e4)
    
    @@
    expression e1, e2, e3, e4;
    @@
    -    pci_unmap_single(e1, e2, e3, e4)
    +    dma_unmap_single(&e1->dev, e2, e3, e4)
    
    @@
    expression e1, e2, e3, e4, e5;
    @@
    -    pci_map_page(e1, e2, e3, e4, e5)
    +    dma_map_page(&e1->dev, e2, e3, e4, e5)
    
    @@
    expression e1, e2, e3, e4;
    @@
    -    pci_unmap_page(e1, e2, e3, e4)
    +    dma_unmap_page(&e1->dev, e2, e3, e4)
    
    @@
    expression e1, e2, e3, e4;
    @@
    -    pci_map_sg(e1, e2, e3, e4)
    +    dma_map_sg(&e1->dev, e2, e3, e4)
    
    @@
    expression e1, e2, e3, e4;
    @@
    -    pci_unmap_sg(e1, e2, e3, e4)
    +    dma_unmap_sg(&e1->dev, e2, e3, e4)
    
    @@
    expression e1, e2, e3, e4;
    @@
    -    pci_dma_sync_single_for_cpu(e1, e2, e3, e4)
    +    dma_sync_single_for_cpu(&e1->dev, e2, e3, e4)
    
    @@
    expression e1, e2, e3, e4;
    @@
    -    pci_dma_sync_single_for_device(e1, e2, e3, e4)
    +    dma_sync_single_for_device(&e1->dev, e2, e3, e4)
    
    @@
    expression e1, e2, e3, e4;
    @@
    -    pci_dma_sync_sg_for_cpu(e1, e2, e3, e4)
    +    dma_sync_sg_for_cpu(&e1->dev, e2, e3, e4)
    
    @@
    expression e1, e2, e3, e4;
    @@
    -    pci_dma_sync_sg_for_device(e1, e2, e3, e4)
    +    dma_sync_sg_for_device(&e1->dev, e2, e3, e4)
    
    @@
    expression e1, e2;
    @@
    -    pci_dma_mapping_error(e1, e2)
    +    dma_mapping_error(&e1->dev, e2)
    
    @@
    expression e1, e2;
    @@
    -    pci_set_dma_mask(e1, e2)
    +    dma_set_mask(&e1->dev, e2)
    
    @@
    expression e1, e2;
    @@
    -    pci_set_consistent_dma_mask(e1, e2)
    +    dma_set_coherent_mask(&e1->dev, e2)
    
    Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    tititiou36 authored and mchehab committed Jun 17, 2021
  25. media: imx-jpeg: Constify static struct mxc_jpeg_fmt

    It is only read-from, so make it const. In order to be able to do this,
    constify all places where mxc_jpeg_fmt is used, in function arguments,
    return values and pointers. On top of that, make the name a pointer to
    const char.
    
    On aarch64, this shrinks object code size with 550 bytes with gcc 11.1.0,
    and almost 2kB with clang 12.0.0.
    
    Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    rikardfalkeborn authored and mchehab committed Jun 17, 2021
  26. media: imx-jpeg: Constify static struct v4l2_m2m_ops

    The only usage of mxc_jpeg_m2m_ops is to pass its address to
    v4l2_m2m_init() which takes a pointer to const struct v4l2_m2m_ops. Make
    it const to allow the compiler to put it in read-only memory.
    
    Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    rikardfalkeborn authored and mchehab committed Jun 17, 2021
  27. media: rcar-csi2: Add support for Y10 and Y8

    Add support for two new media bus formats, Y10 and Y8.
    
    Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    Niklas Söderlund authored and mchehab committed Jun 17, 2021
  28. media: v4l2-event: Modified variable type 'unsigned' to 'unsigned int'

    Prefer 'unsigned int' to bare use of 'unsigned'.
    So modified variable type 'unsigned' to 'unsigned int' in v4l2-event.c.
    
    Signed-off-by: lijian <lijian@yulong.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    lijian authored and mchehab committed Jun 17, 2021
  29. media: usb: cpia2: Fixed Coding Style issues

    Fixed all the Coding style issues generated by checkpatch.pl.
    The changes made considering the --strict option.
    
    Signed-off-by: Piyush Thange <pthange19@gmail.com>
    Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
    its-crypted authored and mchehab committed Jun 17, 2021
Older