Skip to content
Snippets Groups Projects
  1. Nov 14, 2019
    • Helen Koike's avatar
      MAINTAINERS: add entry for Rockchip ISP1 driver · f15422c0
      Helen Koike authored
      
      Add MAINTAINERS entry for the rockchip isp1 driver.
      
      Signed-off-by: default avatarHelen Koike <helen.koike@collabora.com>
      
      Series-to: linux-rockchip@lists.infradead.org
      Series-cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org
      Series-cc: mchehab@kernel.org, linux-media@vger.kernel.org
      Series-cc: sakari.ailus@linux.intel.com, hans.verkuil@cisco.com
      Series-cc: tfiga@chromium.org, zhengsq@rock-chips.com
      Series-cc: laurent.pinchart@ideasonboard.com, zyc@rock-chips.com
      Series-cc: eddie.cai.linux@gmail.com, jeffy.chen@rock-chips.com
      Series-cc: heiko@sntech.de, gregkh@linuxfoundation.org
      Series-cc: kernel@collabora.com, ezequiel@collabora.com, jacob-chen@iotwrt.com
      Series-cc: robh+dt@kernel.org, mark.rutland@arm.com, devicetree@vger.kernel.org
      
      Series-version: 11
      Series-changes: 9
      - Move to staging
      
      Cover-letter:
      Rockchip ISP Driver
      Hello,
      
      This series adds the Rockchip Image Signal Processing Unit v1 driver to
      staging.
      
      The main reason to be in staging is that people are already using it from the
      mailing list (including libcamera), and having it in mainline makes the workflow
      easier. Also, it is easier for other people to contribute back (with code
      or testing the driver).
      
      We plan to actively work on this driver to get it our of staging.
      
      This patchset is also available at:
      https://gitlab.collabora.com/koike/linux/tree/rockchip/isp/v11
      
      Libcamera patched to work with this version:
      https://gitlab.collabora.com/koike/libcamera
      (also sent to the mailing list)
      
      The major difference in v11 are:
      - Fixed compiling warnings found with W=1
      - Fixed checkpatch errors
      - Add clock-names values in dt-bindings
      
      This series only touches MAINTAINERS file and drivers/staging/
      
      MAINTAINERS
      drivers/staging/media/Kconfig
      drivers/staging/media/Makefile
      drivers/staging/media/phy-rockchip-dphy/Kconfig
      drivers/staging/media/phy-rockchip-dphy/Makefile
      drivers/staging/media/phy-rockchip-dphy/TODO
      drivers/staging/media/phy-rockchip-dphy/phy-rockchip-dphy.c
      drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-isp1.txt
      drivers/staging/media/rkisp1/Documentation/devicetree/bindings/media/rockchip-mipi-dphy.txt
      drivers/staging/media/rkisp1/Documentation/media/uapi/v4l/pixfmt-meta-rkisp1-params.rst
      drivers/staging/media/rkisp1/Documentation/media/uapi/v4l/pixfmt-meta-rkisp1-stat.rst
      drivers/staging/media/rkisp1/Kconfig
      drivers/staging/media/rkisp1/Makefile
      drivers/staging/media/rkisp1/TODO
      drivers/staging/media/rkisp1/capture.c
      drivers/staging/media/rkisp1/capture.h
      drivers/staging/media/rkisp1/common.h
      drivers/staging/media/rkisp1/dev.c
      drivers/staging/media/rkisp1/dev.h
      drivers/staging/media/rkisp1/isp_params.c
      drivers/staging/media/rkisp1/isp_params.h
      drivers/staging/media/rkisp1/isp_stats.c
      drivers/staging/media/rkisp1/isp_stats.h
      drivers/staging/media/rkisp1/regs.c
      drivers/staging/media/rkisp1/regs.h
      drivers/staging/media/rkisp1/rkisp1.c
      drivers/staging/media/rkisp1/rkisp1.h
      drivers/staging/media/rkisp1/uapi/rkisp1-config.h
      
      Two drivers were added, including a TODO list for removing it from
      staging:
      
      * phy-rockchip-dphy: mipi dphy driver used by csi
      * rkisp1: the image signal processing unit driver
      
      Thanks
      Helen
      END
      f15422c0
    • Jacob Chen's avatar
      media: staging: dt-bindings: Document the Rockchip MIPI RX D-PHY bindings · f2788c25
      Jacob Chen authored
      
      Add DT bindings documentation for Rockchip MIPI D-PHY RX
      
      Signed-off-by: default avatarJacob Chen <jacob2.chen@rock-chips.com>
      Reviewed-by: default avatarRob Herring <robh@kernel.org>
      [refactored for upstream]
      Signed-off-by: default avatarHelen Koike <helen.koike@collabora.com>
      
      Series-changes: 10
      - unsquash
      
      Series-changes: 9
      - fix title division style
      - squash
      - move to staging
      
      Series-changes: 7
      - updated doc with new design and tested example
      f2788c25
    • Jacob Chen's avatar
      media: staging: dt-bindings: Document the Rockchip ISP1 bindings · ab8c1691
      Jacob Chen authored
      
      Add DT bindings documentation for Rockchip ISP1
      
      Signed-off-by: default avatarJacob Chen <jacob2.chen@rock-chips.com>
      Reviewed-by: default avatarRob Herring <robh@kernel.org>
      [refactored for upstream]
      Signed-off-by: default avatarHelen Koike <helen.koike@collabora.com>
      
      Series-changes: 11
      - add clock-names values
      
      Series-changes: 10
      - unsquash
      
      Series-changes: 9
      - squash
      - move to staging
      
      Series-changes: 8
      - fix title division style
      
      Series-changes: 7
      - update document with new design and tested example
      ab8c1691
    • Jacob Chen's avatar
      media: staging: rkisp1: add rockchip isp1 core driver · 6d383b3d
      Jacob Chen authored
      
      Add the core driver for rockchip isp1.
      
      Signed-off-by: default avatarJacob Chen <jacob2.chen@rock-chips.com>
      Signed-off-by: default avatarShunqian Zheng <zhengsq@rock-chips.com>
      Signed-off-by: default avatarYichong Zhong <zyc@rock-chips.com>
      Signed-off-by: default avatarJacob Chen <cc@rock-chips.com>
      Signed-off-by: default avatarEddie Cai <eddie.cai.linux@gmail.com>
      Signed-off-by: default avatarJeffy Chen <jeffy.chen@rock-chips.com>
      Signed-off-by: default avatarAllon Huang <allon.huang@rock-chips.com>
      Signed-off-by: default avatarTomasz Figa <tfiga@chromium.org>
      [fixed compilation and run time errors regarding new v4l2 async API]
      Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      [Add missing module device table]
      Signed-off-by: default avatarEzequiel Garcia <ezequiel@collabora.com>
      [refactored for upstream]
      Signed-off-by: default avatarHelen Koike <helen.koike@collabora.com>
      
      Series-changes: 11
      dev
      - fix checkpatch erros
      
      Series-changes: 10
      - unsquash
      - update TODO
      
      Series-changes: 9
      - remove ctrl_handler from struct rkisp1_isp_subdev
      - replace v4l2_{dgb,info,warn,err} by dev_*
      - s/pr_info/dev_dbg
      - s/int size/unsigned int size
      - remove module param rkisp1_debug
      - coding style fixes
      - fix error in subdev_notifier_bound, check dphy before assigning to sensor->dphy
      - remove subdevs fixed size array from rkisp1_pipeline
      - remove sensors list, as it can be identified from the media topology
      - Kconfig: add COMPILE_TEST in the dependency
      - use v4l2_pipeline_pm_use and remove _isp_pipeline_s_power() and _subdev_set_power()
      - remove struct rkisp1_pipeline and retrieve pipeline information from the media framework
      - remove remaining rk3288 code
      - cache pixel rate control in sctruct sensor_async_subdev
      - remove enum rkisp1_sd_type
      - squash
      - move to staging
      
      Series-changes: 7
      - VIDEO_ROCKCHIP_ISP1 selects VIDEOBUF2_VMALLOC
      - add PHY_ROCKCHIP_DPHY as a dependency for VIDEO_ROCKCHIP_ISP1
      - Fix compilation and runtime errors due to bitrotting
      The code has bit-rotten since March 2018, fix compilation errors.
      The new V4L2 async notifier API requires notifiers to be initialized by
      a call to v4l2_async_notifier_init() before being used, do so.
      - Add missing module device table
      - use clk_bulk framework
      - add missing notifiers cleanups
      - s/strlcpy/strscpy
      - normalize bus_info name
      - fix s_stream error path, stream_cnt wans't being decremented properly
      - use devm_platform_ioremap_resource() helper
      - s/deice/device
      - redesign: remove mipi/csi subdevice, sensors connect directly to the
      isp subdevice in the media topology now.
      - remove "saved_state" member from rkisp1_stream struct
      - Reverse the order of MIs
      - Simplify MI interrupt handling
      Rather than adding unnecessary indirection, just use stream index to
      handle MI interrupt enable/disable/clear, since the stream index matches
      the order of bits now, thanks to previous patch. While at it, remove
      some dead code.
      - code styling and checkpatch fixes
      6d383b3d
    • Jacob Chen's avatar
      media: staging: rkisp1: add capture device driver · 610b1437
      Jacob Chen authored
      
      This is the capture device interface driver that provides the v4l2
      user interface. Frames can be received from ISP1.
      
      Signed-off-by: default avatarJacob Chen <jacob2.chen@rock-chips.com>
      Signed-off-by: default avatarShunqian Zheng <zhengsq@rock-chips.com>
      Signed-off-by: default avatarYichong Zhong <zyc@rock-chips.com>
      Signed-off-by: default avatarJacob Chen <cc@rock-chips.com>
      Signed-off-by: default avatarEddie Cai <eddie.cai.linux@gmail.com>
      Signed-off-by: default avatarJeffy Chen <jeffy.chen@rock-chips.com>
      Signed-off-by: default avatarAllon Huang <allon.huang@rock-chips.com>
      Signed-off-by: default avatarTomasz Figa <tfiga@chromium.org>
      [refactored for upstream]
      Signed-off-by: default avatarHelen Koike <helen.koike@collabora.com>
      
      Series-changes: 11
      capture
      - fix checkpatch errors
      
      Series-changes: 10
      - unsquash
      
      Series-changes: 9
      - fix typos
      - fix queue_setup: different behaviour when num_plane is 0 or not
      - replace v4l2_{dgb,info,warn,err} by dev_*
      - squash
      - move to staging
      
      Series-changes: 7
      - s/strlcpy/strscpy
      - Fix v4l2-compliance issues:
              * remove input ioctls
      media api can be used to define the topology, this input api is not
      required. Besides it, if an input is enumerated, v4l2-compliance is not
      happy with G_FMT returning the default colorspace instead of something
      more specific.
              * return the pixelformat to the userspace
      G_/S_/TRY_ FORMAT should return a valid pixelformat to the user, even if
      the user gave an invalid one
              * add missing default colorspace and ycbcr
              * fix wrong pixformat in mp_fmts[] table
              * add buf type check in s_/g_selection
              * queue_setup - check sizes
              * normalize bus_info name
              * fix field any v4l2-compliance -s complain - set field none
              when streaming
      - Fix compiling error: s/vidioc_enum_fmt_vid_cap_mplane/vidioc_enum_fmt_vid_cap
      - Replace stream state with a boolean
      The rkisp1_state enum consists only of 3 entries, where 1 is completely
      unused and the other two respectively mean not streaming or streaming.
      Replace it with a boolean called "streaming".
      - Simplify MI interrupt handling
      Rather than adding unnecessary indirection, just use stream index to
      handle MI interrupt enable/disable/clear, since the stream index matches
      the order of bits now, thanks to previous patch. While at it, remove
      some dead code.
      - code styling and checkpatch fixes
      - add link_validate: don't allow a link with bayer/non-bayer mismatch
      610b1437
    • Jacob Chen's avatar
      media: staging: rkisp1: add ISP1 params driver · d1531468
      Jacob Chen authored
      
      Add the output video driver that accept params from userspace.
      
      Signed-off-by: default avatarJacob Chen <jacob2.chen@rock-chips.com>
      Signed-off-by: default avatarShunqian Zheng <zhengsq@rock-chips.com>
      Signed-off-by: default avatarYichong Zhong <zyc@rock-chips.com>
      Signed-off-by: default avatarJacob Chen <cc@rock-chips.com>
      Signed-off-by: default avatarEddie Cai <eddie.cai.linux@gmail.com>
      Signed-off-by: default avatarJeffy Chen <jeffy.chen@rock-chips.com>
      Signed-off-by: default avatarAllon Huang <allon.huang@rock-chips.com>
      Signed-off-by: default avatarTomasz Figa <tfiga@chromium.org>
      [refactored for upstream]
      Signed-off-by: default avatarHelen Koike <helen.koike@collabora.com>
      
      Series-changes: 11
      params
      - fix compiling warnings
      - fix checkpatch errors
      
      Series-changes: 10
      - unsquash
      
      Series-changes: 9
      - squash
      - move to staging
      
      Series-changes: 7
      - s/strlcpy/strscpy
      - s/strcpy/strscpy
      - fix config lsc error
      LSC data table size is 17x17, but when configuring data to ISP,
      should be aligned to 18x17. That means every last data of last
      line should be filled with 0, and not filled with the data of
      next line.
      - Update new ISP parameters immediately
      For those sub modules that have shadow registers in core isp, the
      new programing parameters would not be active if both
      CIF_ISP_CTRL_ISP_CFG_UPD_PERMANENT and CFG_UPD are not set. Now
      we configure CFG_UPD to force update the shadow registers when new
      ISP parameters are configured.
      - fix some ISP parameters config error
      Some ISP parameter config functions may override the old enable
      bit value, because the enable bits of these modules are in the
      same registers with parameters. So we should save the old enable
      bits firstly.
      - code styling and checkpatch fixes
      d1531468
    • Jacob Chen's avatar
      media: staging: rkisp1: add ISP1 statistics driver · 089a0deb
      Jacob Chen authored
      
      Add the capture video driver for rockchip isp1 statistics block.
      
      Signed-off-by: default avatarJacob Chen <jacob2.chen@rock-chips.com>
      Signed-off-by: default avatarShunqian Zheng <zhengsq@rock-chips.com>
      Signed-off-by: default avatarYichong Zhong <zyc@rock-chips.com>
      Signed-off-by: default avatarJacob Chen <cc@rock-chips.com>
      Signed-off-by: default avatarEddie Cai <eddie.cai.linux@gmail.com>
      Signed-off-by: default avatarJeffy Chen <jeffy.chen@rock-chips.com>
      Signed-off-by: default avatarAllon Huang <allon.huang@rock-chips.com>
      Signed-off-by: default avatarTomasz Figa <tfiga@chromium.org>
      [refactored for upstream]
      Signed-off-by: default avatarHelen Koike <helen.koike@collabora.com>
      
      Series-changes: 11
      stats
      - fix compiling warnings
      - fix checkpatch errors
      
      Series-changes: 10
      - unsquash
      
      Series-changes: 9
      - replace v4l2_{dgb,info,warn,err} by dev_*
      - remove LOG_ISR_EXE_TIME ifndef's
      - constify ops structs
      - s/strlcpy/strscpy
      - add missing mutex_destroy() calls in rkisp1_register_stats_vdev error path
      - squash
      - move to staging
      
      Series-changes: 7
      - s/strlcpy/strscpy
      - sort out the locks in isp stats
      - code styling and checkpatch fixes
      089a0deb
    • Jacob Chen's avatar
      media: staging: rkisp1: add Rockchip ISP1 subdev driver · 1c78fdc5
      Jacob Chen authored
      
      Add the subdev driver for rockchip isp1.
      
      Signed-off-by: default avatarJacob Chen <jacob2.chen@rock-chips.com>
      Signed-off-by: default avatarShunqian Zheng <zhengsq@rock-chips.com>
      Signed-off-by: default avatarYichong Zhong <zyc@rock-chips.com>
      Signed-off-by: default avatarJacob Chen <cc@rock-chips.com>
      Signed-off-by: default avatarEddie Cai <eddie.cai.linux@gmail.com>
      Signed-off-by: default avatarJeffy Chen <jeffy.chen@rock-chips.com>
      Signed-off-by: default avatarAllon Huang <allon.huang@rock-chips.com>
      Signed-off-by: default avatarTomasz Figa <tfiga@chromium.org>
      [fixed unknown entity type / switched to PIXEL_RATE]
      Signed-off-by: default avatarEzequiel Garcia <ezequiel@collabora.com>
      [refactored for upstream]
      Signed-off-by: default avatarHelen Koike <helen.koike@collabora.com>
      
      Series-changes: 11
      rkisp1
      - Fix compiling warnings
      - Fix checkpatch errors
      
      Series-changes: 10
      - unsquash
      
      Series-changes: 9
      - remove unnecessary double parenthesis
      - remove double call to media_entity_remote_pad(local) in
      get_remote_sensor()
      - remove ctrl_handler from struct rkisp1_isp_subdev
      - replace v4l2_{dgb,info,warn,err} by dev_*
      - fix error returned in link_validate
      - remove s_power() callback
      - add regwrite/regread wrappers
      - add macros RKISP1_DEF_SRC_PAD_FMT/RKISP1_DEF_SINK_PAD_FMT
      - several minor cleanups
      - s/RKISP1_ISP_PAD_SINK([^_])/RKISP1_ISP_PAD_SINK_VIDEO\1/
      - merge tables rkisp1_isp_input_formats and rkisp1_isp_output_formats
      - in_fmt and out_fmt as pointers
      - simply struct rkisp1_isp_subdev to work correctly with try format
      - fix crop/fmt propagation
      - squash
      - migrate to staging
      
      Series-changes: 7
      - fixed warning because of unknown entity type
      - fixed v4l2-compliance errors regarding rkisp1 formats, try formats
      and default values
      - fix typo riksp1/rkisp1
      - redesign: remove mipi/csi subdevice, sensors connect directly to the
      isp subdevice in the media topology now. As a consequence, remove the
      hack in mipidphy_g_mbus_config() where information from the sensor was
      being propagated through the topology.
      - From the old dphy:
              * cache get_remote_sensor() in s_stream
              * use V4L2_CID_PIXEL_RATE instead of V4L2_CID_LINK_FREQ
      - Replace stream state with a boolean
      - code styling and checkpatch fixes
      - fix stop_stream (return after calling stop, do not reenable the stream)
      - fix rkisp1_isp_sd_get_selection when V4L2_SUBDEV_FORMAT_TRY is set
      - fix get format in output (isp_sd->out_fmt.mbus_code was being ignored)
      - s/intput/input
      - remove #define sd_to_isp_sd(_sd), add a static inline as it will be
      reused by the capture
      1c78fdc5
    • Jeffy Chen's avatar
      media: staging: rkisp1: add user space ABI definitions · d439ed37
      Jeffy Chen authored
      
      Add the header for userspace
      
      Signed-off-by: default avatarJeffy Chen <jeffy.chen@rock-chips.com>
      Signed-off-by: default avatarJacob Chen <jacob2.chen@rock-chips.com>
      [refactored for upstream]
      Signed-off-by: default avatarHelen Koike <helen.koike@collabora.com>
      
      Series-changes: 11
      - fix checkpatch errors
      
      Series-changes: 10
      - unsquash
      - define metadata pixelformats in uapi/rkisp1-config.h
      
      Series-changes: 9
      - squash
      - move to staging
      
      Series-changes: 7
      - Fix checkpatch errors (lines over 80 and SPDX)
      - Add TODO to improve docs
      d439ed37
    • Jacob Chen's avatar
      media: staging: rkisp1: add document for rkisp1 meta buffer format · 83d23e56
      Jacob Chen authored
      
      This commit add document for rkisp1 meta buffer format
      
      Signed-off-by: default avatarJacob Chen <jacob-chen@rock-chips.com>
      Acked-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
      [refactored for upstream]
      Signed-off-by: default avatarHelen Koike <helen.koike@collabora.com>
      
      Series-changes: 10
      - unsquash
      
      Series-changes: 9
      - squash
      - migrate to staging
      - remove meta-formats.rst update
      
      Series-changes: 8
      - Add SPDX in the header
      - Remove emacs configs
      - Fix doc style
      
      Series-changes: 7
      - s/correspond/corresponding
      - s/use/uses
      - s/docuemnt/document
      83d23e56
    • Jacob Chen's avatar
      media: staging: phy-rockchip-dphy: add Rockchip MIPI Synopsys DPHY driver · 19796472
      Jacob Chen authored
      
      Add driver for Rockchip MIPI Synopsys DPHY driver
      
      Signed-off-by: default avatarJacob Chen <jacob2.chen@rock-chips.com>
      Signed-off-by: default avatarShunqian Zheng <zhengsq@rock-chips.com>
      Signed-off-by: default avatarTomasz Figa <tfiga@chromium.org>
      [migrate to phy framework]
      Signed-off-by: default avatarEzequiel Garcia <ezequiel@collabora.com>
      [refactored for upstream]
      Signed-off-by: default avatarHelen Koike <helen.koike@collabora.com>
      
      Series-changes: 11
      dphy
      - fix checkpatch errors
      
      Series-changes: 9
      dphy
      - Move to staging
      - replace memcpy by a directly assignment
      - remove unecessary ret variable in rockchip_dphy_init
      - s/0x1/1
      - s/0x0/0
      - coding style changes
      - dphy_reg variable sizes
      - variables from int to unsigned int
      - rename functions to start with rk_
      - rename dphy0 to rx
      - fix hardcoded lane0 usage
      - disable rx on power off
      - general cleanups of unused variables
      
      Series-changes: 8
      - Remove boiler plate license text
      
      Series-changes: 7
      - Migrate dphy specific code from
      drivers/media/platform/rockchip/isp1/mipi_dphy_sy.c
      to drivers/phy/rockchip/phy-rockchip-dphy.c
      - Drop support for rk3288
      - Drop support for dphy txrx
      - code styling and checkpatch fixes
      19796472
    • Helen Koike's avatar
      tmp: rk3399.dtsi for isp1 · a696fc67
      Helen Koike authored
      a696fc67
    • Helen Koike's avatar
      tmp: rk3399-gru-scarlet.dtsi · f4a7f077
      Helen Koike authored
      f4a7f077
    • Helen Koike's avatar
      tmp: ov5647 / rockpi 4 · 7a6e1e17
      Helen Koike authored
      7a6e1e17
  2. Nov 10, 2019
Loading