Skip to contentSkip to conversation

Rockchip ISP1 Driver

PATCH In review Jacob Chen 9 participants 55 messages Mar 8, 2018 – Apr 26, 2019 Page 2 of 2

Subsystems (5)
lore
Share & tools
lore
author
#34 lore raw

PATCH v6 11/17 dt-bindings: Document the Rockchip MIPI RX D-PHY bindings

In reply to Jacob Chen

From: Jacob Chen <[email protected]>

Add DT bindings documentation for Rockchip MIPI D-PHY RX

---
 .../bindings/media/rockchip-mipi-dphy.txt          | 90 ++++++++++++++++++++++
 1 file changed, 90 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/rockchip-mipi-dphy.txt
Documentation/devicetree/bindings/media/rockchip-mipi-dphy.txt new file +90 -0
new file mode 100644
index 000000000000..d83700faf4c4
@@ -0,0 +1,90 @@
+Rockchip SoC MIPI RX D-PHY
+-------------------------------------------------------------
+
+Required properties:
+- compatible: value should be one of the following
+	"rockchip,rk3288-mipi-dphy"
+	"rockchip,rk3399-mipi-dphy"
+- clocks : list of clock specifiers, corresponding to entries in
+	clock-names property;
+- clock-names: required clock name.
+
+MIPI RX D-PHY use registers in "general register files", it
+should be a child of the GRF.
+MIPI TXRX D-PHY have its own registers, it must have a reg property.
+
+Optional properties:
+- reg: offset and length of the register set for the device.
+- rockchip,grf: MIPI TX1RX1 D-PHY not only has its own register but also
+		the GRF, so it is only necessary for MIPI TX1RX1 D-PHY.
+
+port node
+-------------------
+
+The device node should contain two 'port' child nodes, according to the bindings
+defined in Documentation/devicetree/bindings/media/video-interfaces.txt.
+
+The first port show the sensors connected in this mipi-dphy.
+- endpoint:
+	- remote-endpoint: Linked to a sensor with a MIPI CSI-2 video bus.
+	- data-lanes : (required) an array specifying active physical MIPI-CSI2
+			data input lanes and their mapping to logical lanes; the
+			D-PHY can't reroute lanes, so the array's content should
+			be consecutive and only its length is meaningful.
+
+The port node must contain at least one endpoint. It could have multiple endpoints
+linked to different sensors, but please note that they are not supposed to be
+activated at the same time.
+
+The second port should be connected to isp node.
+- endpoint:
+	- remote-endpoint:  Linked to Rockchip ISP1, which is defined
+		in rockchip-isp1.txt.
+
+Device node example
+-------------------
+
+grf: syscon at ff770000 {
+	compatible = "rockchip,rk3288-grf", "syscon", "simple-mfd";
+
+...
+
+	mipi_dphy_rx0: mipi-dphy-rx0 {
+		compatible = "rockchip,rk3399-mipi-dphy";
+		clocks = <&cru SCLK_MIPIDPHY_REF>,
+			<&cru SCLK_DPHY_RX0_CFG>,
+			<&cru PCLK_VIO_GRF>;
+		clock-names = "dphy-ref", "dphy-cfg", "grf";
+		power-domains = <&power RK3399_PD_VIO>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port at 0 {
+				reg = <0>;
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				mipi_in_wcam: endpoint at 0 {
+					reg = <0>;
+					remote-endpoint = <&wcam_out>;
+					data-lanes = <1 2>;
+				};
+				mipi_in_ucam: endpoint at 1 {
+					reg = <1>;
+					remote-endpoint = <&ucam_out>;
+					data-lanes = <1>;
+				};
+			};
+
+			port at 1 {
+				reg = <1>;
+
+				dphy_rx0_out: endpoint {
+					remote-endpoint = <&isp0_mipi_in>;
+				};
+			};
+		};
+	};
+};
Signature · 1 line
2.16.1
author
#35 lore raw

PATCH v6 12/17 ARM: dts: rockchip: add isp node for rk3288

In reply to Jacob Chen

From: Jacob Chen <[email protected]>

rk3288 have a Embedded 13M ISP

---
 arch/arm/boot/dts/rk3288.dtsi | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)
arch/arm/boot/dts/rk3288.dtsi +17 -0
index ad6bda85c85a..6c122aaf06a7 100644
@@ -962,6 +962,23 @@
 		status = "disabled";
 	};
 
+	isp: isp at ff910000 {
+		compatible = "rockchip,rk3288-cif-isp";
+		reg = <0x0 0xff910000 0x0 0x4000>;
+		interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cru SCLK_ISP>, <&cru ACLK_ISP>,
+			 <&cru HCLK_ISP>, <&cru PCLK_ISP_IN>,
+			 <&cru SCLK_ISP_JPE>;
+		clock-names = "clk_isp", "aclk_isp",
+			      "hclk_isp", "pclk_isp_in",
+			      "sclk_isp_jpe";
+		assigned-clocks = <&cru SCLK_ISP>, <&cru SCLK_ISP_JPE>;
+		assigned-clock-rates = <400000000>, <400000000>;
+		power-domains = <&power RK3288_PD_VIO>;
+		iommus = <&isp_mmu>;
+		status = "disabled";
+	};
+
 	isp_mmu: iommu at ff914000 {
 		compatible = "rockchip,iommu";
 		reg = <0x0 0xff914000 0x0 0x100>, <0x0 0xff915000 0x0 0x100>;
Signature · 1 line
2.16.1
author
#36 lore raw

PATCH v6 13/17 ARM: dts: rockchip: add rx0 mipi-phy for rk3288

In reply to Jacob Chen

From: Jacob Chen <[email protected]>

It's a Designware MIPI D-PHY, used by ISP in rk3288.

---
 arch/arm/boot/dts/rk3288.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm/boot/dts/rk3288.dtsi +7 -0
index 6c122aaf06a7..3a530b72c057 100644
@@ -864,6 +864,13 @@
 			status = "disabled";
 		};
 
+		mipi_phy_rx0: mipi-phy-rx0 {
+			compatible = "rockchip,rk3288-mipi-dphy";
+			clocks = <&cru SCLK_MIPIDSI_24M>, <&cru PCLK_MIPI_CSI>;
+			clock-names = "dphy-ref", "pclk";
+			status = "disabled";
+		};
+
 		io_domains: io-domains {
 			compatible = "rockchip,rk3288-io-voltage-domain";
 			status = "disabled";
Signature · 1 line
2.16.1
author
#37 lore raw

PATCH v6 14/17 ARM: dts: rockchip: Add dts mipi-dphy TXRX1 node for rk3288

In reply to Jacob Chen

From: Wen Nuan <[email protected]>

Change-Id I0b6122b2b34ae0f24f0d4a1111c1bbe6018cac4e
---
 arch/arm/boot/dts/rk3288.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm/boot/dts/rk3288.dtsi +9 -0
index 3a530b72c057..ed05f3d77358 100644
@@ -1164,6 +1164,15 @@
 		};
 	};
 
+	mipi_phy_tx1rx1: mipi-phy-tx1rx1 at ff968000 {
+		compatible = "rockchip,rk3288-mipi-dphy";
+		reg = <0x0 0xff968000 0x0 0x4000>;
+		rockchip,grf = <&grf>;
+		clocks = <&cru SCLK_MIPIDSI_24M>, <&cru PCLK_MIPI_CSI>;
+		clock-names = "dphy-ref", "pclk";
+		status = "disabled";
+	};
+
 	edp: dp at ff970000 {
 		compatible = "rockchip,rk3288-dp";
 		reg = <0x0 0xff970000 0x0 0x4000>;
Signature · 1 line
2.16.1
author
#38 lore raw

PATCH v6 15/17 arm64: dts: rockchip: add isp0 node for rk3399

In reply to Jacob Chen

From: Shunqian Zheng <[email protected]>

rk3399 have two ISP, but we havn't test isp1, so just add isp0 at present.

---
 arch/arm64/boot/dts/rockchip/rk3399.dtsi | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
arch/arm64/boot/dts/rockchip/rk3399.dtsi +15 -0
index 2605118d4b4c..14ed016f2fdd 100644
@@ -1614,6 +1614,21 @@
 		status = "disabled";
 	};
 
+	isp0: isp0 at ff910000 {
+		compatible = "rockchip,rk3399-cif-isp";
+		reg = <0x0 0xff910000 0x0 0x4000>;
+		interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH 0>;
+		clocks = <&cru SCLK_ISP0>,
+			 <&cru ACLK_ISP0>, <&cru ACLK_ISP0_WRAPPER>,
+			 <&cru HCLK_ISP0>, <&cru HCLK_ISP0_WRAPPER>;
+		clock-names = "clk_isp",
+			      "aclk_isp", "aclk_isp_wrap",
+			      "hclk_isp", "hclk_isp_wrap";
+		power-domains = <&power RK3399_PD_ISP0>;
+		iommus = <&isp0_mmu>;
+		status = "disabled";
+	};
+
 	isp0_mmu: iommu at ff914000 {
 		compatible = "rockchip,iommu";
 		reg = <0x0 0xff914000 0x0 0x100>, <0x0 0xff915000 0x0 0x100>;
Signature · 1 line
2.16.1
#39 lore raw

PATCH 15/17 arm64: dts: rockchip: add isp0 node for rk3399

rk3399 have two ISP, but we havn't test isp1, so just add isp0 at present.

---
 arch/arm64/boot/dts/rockchip/rk3399.dtsi | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
arch/arm64/boot/dts/rockchip/rk3399.dtsi +18 -0
index 2605118..5729786 100644
@@ -1614,6 +1614,24 @@
 		status = "disabled";
 	};
 
+	isp0: isp0@ff910000 {
+		compatible = "rockchip,rk3399-cif-isp";
+		reg = <0x0 0xff910000 0x0 0x4000>;
+		interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH 0>;
+		clocks = <&cru SCLK_ISP0>,
+			 <&cru ACLK_ISP0>, <&cru ACLK_ISP0_WRAPPER>,
+			 <&cru HCLK_ISP0>, <&cru HCLK_ISP0_WRAPPER>;
+		clock-names = "clk_isp",
+			      "aclk_isp", "aclk_isp_wrap",
+			      "hclk_isp", "hclk_isp_wrap";
+		assigned-clocks = <&cru SCLK_ISP0>, <&cru ACLK_ISP0>;
+		assigned-clock-rates = <500000000>, <400000000>;
+
+		power-domains = <&power RK3399_PD_ISP0>;
+		iommus = <&isp0_mmu>;
+		status = "disabled";
+	};
+
 	isp0_mmu: iommu@ff914000 {
 		compatible = "rockchip,iommu";
 		reg = <0x0 0xff914000 0x0 0x100>, <0x0 0xff915000 0x0 0x100>;
Signature · 1 line
1.9.1
#40 lore raw

PATCH 15/17 arm64: dts: rockchip: add isp0 node for rk3399

In reply to Jacob Chen

rk3399 have two ISP, but we havn't test isp1, so just add isp0 at present.

---
 arch/arm64/boot/dts/rockchip/rk3399.dtsi | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
arch/arm64/boot/dts/rockchip/rk3399.dtsi +18 -0
index 2605118..5729786 100644
@@ -1614,6 +1614,24 @@
 		status = "disabled";
 	};
 
+	isp0: isp0@ff910000 {
+		compatible = "rockchip,rk3399-cif-isp";
+		reg = <0x0 0xff910000 0x0 0x4000>;
+		interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH 0>;
+		clocks = <&cru SCLK_ISP0>,
+			 <&cru ACLK_ISP0>, <&cru ACLK_ISP0_WRAPPER>,
+			 <&cru HCLK_ISP0>, <&cru HCLK_ISP0_WRAPPER>;
+		clock-names = "clk_isp",
+			      "aclk_isp", "aclk_isp_wrap",
+			      "hclk_isp", "hclk_isp_wrap";
+		assigned-clocks = <&cru SCLK_ISP0>, <&cru ACLK_ISP0>;
+		assigned-clock-rates = <500000000>, <400000000>;
+
+		power-domains = <&power RK3399_PD_ISP0>;
+		iommus = <&isp0_mmu>;
+		status = "disabled";
+	};
+
 	isp0_mmu: iommu@ff914000 {
 		compatible = "rockchip,iommu";
 		reg = <0x0 0xff914000 0x0 0x100>, <0x0 0xff915000 0x0 0x100>;
Signature · 1 line
1.9.1
author
#41 lore raw

PATCH v6 16/17 arm64: dts: rockchip: add rx0 mipi-phy for rk3399

In reply to Jacob Chen

From: Shunqian Zheng <[email protected]>

It's a Designware MIPI D-PHY, used for ISP0 in rk3399.

---
 arch/arm64/boot/dts/rockchip/rk3399.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)
arch/arm64/boot/dts/rockchip/rk3399.dtsi +10 -0
index 14ed016f2fdd..d18ab8f56ef2 100644
@@ -1308,6 +1308,16 @@
 			status = "disabled";
 		};
 
+		mipi_dphy_rx0: mipi-dphy-rx0 {
+			compatible = "rockchip,rk3399-mipi-dphy";
+			clocks = <&cru SCLK_MIPIDPHY_REF>,
+				<&cru SCLK_DPHY_RX0_CFG>,
+				<&cru PCLK_VIO_GRF>;
+			clock-names = "dphy-ref", "dphy-cfg", "grf";
+			power-domains = <&power RK3399_PD_VIO>;
+			status = "disabled";
+		};
+
 		u2phy0: usb2-phy at e450 {
 			compatible = "rockchip,rk3399-usb2phy";
 			reg = <0xe450 0x10>;
Signature · 1 line
2.16.1
author
#42 lore raw

PATCH v6 17/17 MAINTAINERS: add entry for Rockchip ISP1 driver

In reply to Jacob Chen

From: Jacob Chen <[email protected]>

Add MAINTAINERS entry for the rockchip isp1 driver. This driver is maintained by rockchip officially and it will be used for rockchip SoC on all linux-kernel based OS.

---
 MAINTAINERS | 10 ++++++++++
 1 file changed, 10 insertions(+)
MAINTAINERS +10 -0
index 4623caf8d72d..7a9ff4fa4592 100644
@@ -11852,6 +11852,16 @@ F:	drivers/hid/hid-roccat*
 F:	include/linux/hid-roccat*
 F:	Documentation/ABI/*/sysfs-driver-hid-roccat*
 
+ROCKCHIP ISP V1 DRIVER
+M:	Jacob chen <[email protected]>
+M:	Shunqian Zheng <[email protected]>
+M:	Yichong Zhong <[email protected]>
+L:	linux-media at vger.kernel.org
+S:	Maintained
+F:	drivers/media/platform/rockchip/isp1/
+F:	Documentation/devicetree/bindings/media/rockchip-isp1.txt
+F:	Documentation/devicetree/bindings/media/rockchip-mipi-dphy.txt
+
 ROCKCHIP RASTER 2D GRAPHIC ACCELERATION UNIT DRIVER
 M:	Jacob chen <[email protected]>
 L:	linux-media at vger.kernel.org
Signature · 1 line
2.16.1
#43 lore raw
In reply to Jacob Chen
Quoted 8 lines · Jacob Chen

From: Jacob Chen <[email protected]>

changes in V6:
- add mipi txrx phy support
- remove bool and enum from uapi header
- add buf_prepare op
- correct some spelling problems
- return all queued buffers when starting stream failed

Thanks Jacob.

For anyone planning to review, especially Hans, who pointed it out in previous version, g_mbus_config is still there and we're working on replacing it with something less controversial.

Best regards,
Tomasz

#44 lore raw
In reply to Jacob Chen

Hi Jacob,

Quoted 8 lines · Jacob Chen

This patch series add a ISP(Camera) v4l2 driver for rockchip rk3288/rk3399 SoC.

Wiki Pages:
http://opensource.rock-chips.com/wiki_Rockchip-isp1

The deprecated g_mbus_config op is not dropped in V6 because i am waiting tomasz's patches.

Which tree is this series based on? On top of v4.16-rc4 I get the build failure below. The V4L2_BUF_TYPE_META_OUTPUT macro, for example, is not even in media_tree.git.

drivers/media/platform/rockchip/isp1/isp_params.c:1321:3: error: ?const struct v4l2_ioctl_ops? has no member named ?vidioc_enum_fmt_meta_out?; did you mean ?vidioc_enum_fmt_meta_cap??
.vidioc_enum_fmt_meta_out = rkisp1_params_enum_fmt_meta_out,
^~~~~~~~~~~~~~~~~~~~~~~~
vidioc_enum_fmt_meta_cap
drivers/media/platform/rockchip/isp1/isp_params.c:1321:30: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.vidioc_enum_fmt_meta_out = rkisp1_params_enum_fmt_meta_out,

                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

drivers/media/platform/rockchip/isp1/isp_params.c:1321:30: note: (near initialization for ?rkisp1_params_ioctl.vidioc_g_std?) drivers/media/platform/rockchip/isp1/isp_params.c:1322:3: error: ?const struct v4l2_ioctl_ops? has no member named ?vidioc_g_fmt_meta_out?; did you mean ?vidioc_g_fmt_meta_cap??
.vidioc_g_fmt_meta_out = rkisp1_params_g_fmt_meta_out,
^~~~~~~~~~~~~~~~~~~~~
vidioc_g_fmt_meta_cap
drivers/media/platform/rockchip/isp1/isp_params.c:1322:27: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.vidioc_g_fmt_meta_out = rkisp1_params_g_fmt_meta_out,

                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

drivers/media/platform/rockchip/isp1/isp_params.c:1322:27: note: (near initialization for ?rkisp1_params_ioctl.vidioc_s_std?) drivers/media/platform/rockchip/isp1/isp_params.c:1323:3: error: ?const struct v4l2_ioctl_ops? has no member named ?vidioc_s_fmt_meta_out?; did you mean ?vidioc_s_fmt_meta_cap??
.vidioc_s_fmt_meta_out = rkisp1_params_g_fmt_meta_out,
^~~~~~~~~~~~~~~~~~~~~
vidioc_s_fmt_meta_cap
drivers/media/platform/rockchip/isp1/isp_params.c:1323:27: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.vidioc_s_fmt_meta_out = rkisp1_params_g_fmt_meta_out,

                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

drivers/media/platform/rockchip/isp1/isp_params.c:1323:27: note: (near initialization for ?rkisp1_params_ioctl.vidioc_querystd?) drivers/media/platform/rockchip/isp1/isp_params.c:1324:3: error: ?const struct v4l2_ioctl_ops? has no member named ?vidioc_try_fmt_meta_out?; did you mean ?vidioc_try_fmt_meta_cap??
.vidioc_try_fmt_meta_out = rkisp1_params_g_fmt_meta_out,
^~~~~~~~~~~~~~~~~~~~~~~
vidioc_try_fmt_meta_cap
drivers/media/platform/rockchip/isp1/isp_params.c:1324:29: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.vidioc_try_fmt_meta_out = rkisp1_params_g_fmt_meta_out,

                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/rockchip/isp1/isp_params.c:1324:29: note: (near initialization for ?rkisp1_params_ioctl.vidioc_enum_input?)
drivers/media/platform/rockchip/isp1/isp_params.c: In function ?rkisp1_params_init_vb2_queue?:
drivers/media/platform/rockchip/isp1/isp_params.c:1462:12: error: ?V4L2_BUF_TYPE_META_OUTPUT? undeclared (first use in this function); did you mean ?V4L2_BUF_TYPE_SDR_OUTPUT??
  q->type = V4L2_BUF_TYPE_META_OUTPUT;
            ^~~~~~~~~~~~~~~~~~~~~~~~~
            V4L2_BUF_TYPE_SDR_OUTPUT

drivers/media/platform/rockchip/isp1/isp_params.c:1462:12: note: each undeclared identifier is reported only once for each function it appears in
CC drivers/media/platform/rockchip/isp1/mipi_dphy_sy.o
drivers/media/platform/rockchip/isp1/isp_params.c: In function ?rkisp1_register_params_vdev?:
drivers/media/platform/rockchip/isp1/isp_params.c:1507:43: error: ?V4L2_CAP_META_OUTPUT? undeclared (first use in this function); did you mean ?V4L2_CAP_VBI_OUTPUT??

  vdev->device_caps = V4L2_CAP_STREAMING | V4L2_CAP_META_OUTPUT;
                                           ^~~~~~~~~~~~~~~~~~~~
                                           V4L2_CAP_VBI_OUTPUT

Thanks,
baruch

Quoted 80 lines

Jacob Chen (12):
media: doc: add document for rkisp1 meta buffer format
media: rkisp1: add Rockchip MIPI Synopsys DPHY driver
media: rkisp1: add Rockchip ISP1 subdev driver
media: rkisp1: add ISP1 statistics driver
media: rkisp1: add ISP1 params driver
media: rkisp1: add capture device driver
media: rkisp1: add rockchip isp1 core driver
dt-bindings: Document the Rockchip ISP1 bindings
dt-bindings: Document the Rockchip MIPI RX D-PHY bindings
ARM: dts: rockchip: add isp node for rk3288
ARM: dts: rockchip: add rx0 mipi-phy for rk3288
MAINTAINERS: add entry for Rockchip ISP1 driver

Jeffy Chen (1):
media: rkisp1: Add user space ABI definitions

Shunqian Zheng (3):
media: videodev2.h, v4l2-ioctl: add rkisp1 meta buffer format
arm64: dts: rockchip: add isp0 node for rk3399
arm64: dts: rockchip: add rx0 mipi-phy for rk3399

Wen Nuan (1):
ARM: dts: rockchip: Add dts mipi-dphy TXRX1 node for rk3288

 .../devicetree/bindings/media/rockchip-isp1.txt    |   69 +
 .../bindings/media/rockchip-mipi-dphy.txt          |   90 +
 Documentation/media/uapi/v4l/meta-formats.rst      |    2 +
 .../media/uapi/v4l/pixfmt-meta-rkisp1-params.rst   |   20 +
 .../media/uapi/v4l/pixfmt-meta-rkisp1-stat.rst     |   18 +
 MAINTAINERS                                        |   10 +
 arch/arm/boot/dts/rk3288.dtsi                      |   33 +
 arch/arm64/boot/dts/rockchip/rk3399.dtsi           |   25 +
 drivers/media/platform/Kconfig                     |   10 +
 drivers/media/platform/Makefile                    |    1 +
 drivers/media/platform/rockchip/isp1/Makefile      |    8 +
 drivers/media/platform/rockchip/isp1/capture.c     | 1751 ++++++++++++++++++++
 drivers/media/platform/rockchip/isp1/capture.h     |  167 ++
 drivers/media/platform/rockchip/isp1/common.h      |  110 ++
 drivers/media/platform/rockchip/isp1/dev.c         |  626 +++++++
 drivers/media/platform/rockchip/isp1/dev.h         |   93 ++
 drivers/media/platform/rockchip/isp1/isp_params.c  | 1539 +++++++++++++++++
 drivers/media/platform/rockchip/isp1/isp_params.h  |   49 +
 drivers/media/platform/rockchip/isp1/isp_stats.c   |  508 ++++++
 drivers/media/platform/rockchip/isp1/isp_stats.h   |   58 +
 .../media/platform/rockchip/isp1/mipi_dphy_sy.c    |  868 ++++++++++
 .../media/platform/rockchip/isp1/mipi_dphy_sy.h    |   15 +
 drivers/media/platform/rockchip/isp1/regs.c        |  239 +++
 drivers/media/platform/rockchip/isp1/regs.h        | 1550 +++++++++++++++++
 drivers/media/platform/rockchip/isp1/rkisp1.c      | 1177 +++++++++++++
 drivers/media/platform/rockchip/isp1/rkisp1.h      |  105 ++
 drivers/media/v4l2-core/v4l2-ioctl.c               |    2 +
 include/uapi/linux/rkisp1-config.h                 |  798 +++++++++
 include/uapi/linux/videodev2.h                     |    4 +
 29 files changed, 9945 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/rockchip-isp1.txt
 create mode 100644 Documentation/devicetree/bindings/media/rockchip-mipi-dphy.txt
 create mode 100644 Documentation/media/uapi/v4l/pixfmt-meta-rkisp1-params.rst
 create mode 100644 Documentation/media/uapi/v4l/pixfmt-meta-rkisp1-stat.rst
 create mode 100644 drivers/media/platform/rockchip/isp1/Makefile
 create mode 100644 drivers/media/platform/rockchip/isp1/capture.c
 create mode 100644 drivers/media/platform/rockchip/isp1/capture.h
 create mode 100644 drivers/media/platform/rockchip/isp1/common.h
 create mode 100644 drivers/media/platform/rockchip/isp1/dev.c
 create mode 100644 drivers/media/platform/rockchip/isp1/dev.h
 create mode 100644 drivers/media/platform/rockchip/isp1/isp_params.c
 create mode 100644 drivers/media/platform/rockchip/isp1/isp_params.h
 create mode 100644 drivers/media/platform/rockchip/isp1/isp_stats.c
 create mode 100644 drivers/media/platform/rockchip/isp1/isp_stats.h
 create mode 100644 drivers/media/platform/rockchip/isp1/mipi_dphy_sy.c
 create mode 100644 drivers/media/platform/rockchip/isp1/mipi_dphy_sy.h
 create mode 100644 drivers/media/platform/rockchip/isp1/regs.c
 create mode 100644 drivers/media/platform/rockchip/isp1/regs.h
 create mode 100644 drivers/media/platform/rockchip/isp1/rkisp1.c
 create mode 100644 drivers/media/platform/rockchip/isp1/rkisp1.h
 create mode 100644 include/uapi/linux/rkisp1-config.h
Signature · 1 line
2.16.1
Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
#45 lore raw

Hi Baruch,

2018-03-08 20:02 GMT+08:00 Baruch Siach <[email protected]>:

Quoted 9 lines

Hi Jacob,

Quoted 6 lines · Jacob Chen

This patch series add a ISP(Camera) v4l2 driver for rockchip rk3288/rk3399 SoC.

Wiki Pages:
http://opensource.rock-chips.com/wiki_Rockchip-isp1

Quoted 7 lines
Quoted 2 lines

The deprecated g_mbus_config op is not dropped in V6 because i am waiting tomasz's patches.

Which tree is this series based on? On top of v4.16-rc4 I get the build failure below. The V4L2_BUF_TYPE_META_OUTPUT macro, for example, is not even in media_tree.git.

This series is based on v4.16-rc4 with below patch.
https://patchwork.kernel.org/patch/9792001/

Quoted 133 lines

drivers/media/platform/rockchip/isp1/isp_params.c:1321:3: error: ?const struct v4l2_ioctl_ops? has no member named ?vidioc_enum_fmt_meta_out?; did you mean ?vidioc_enum_fmt_meta_cap??
.vidioc_enum_fmt_meta_out = rkisp1_params_enum_fmt_meta_out,
^~~~~~~~~~~~~~~~~~~~~~~~
vidioc_enum_fmt_meta_cap
drivers/media/platform/rockchip/isp1/isp_params.c:1321:30: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.vidioc_enum_fmt_meta_out = rkisp1_params_enum_fmt_meta_out,

                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

drivers/media/platform/rockchip/isp1/isp_params.c:1321:30: note: (near initialization for ?rkisp1_params_ioctl.vidioc_g_std?) drivers/media/platform/rockchip/isp1/isp_params.c:1322:3: error: ?const struct v4l2_ioctl_ops? has no member named ?vidioc_g_fmt_meta_out?; did you mean ?vidioc_g_fmt_meta_cap??
.vidioc_g_fmt_meta_out = rkisp1_params_g_fmt_meta_out,
^~~~~~~~~~~~~~~~~~~~~
vidioc_g_fmt_meta_cap
drivers/media/platform/rockchip/isp1/isp_params.c:1322:27: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.vidioc_g_fmt_meta_out = rkisp1_params_g_fmt_meta_out,

                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

drivers/media/platform/rockchip/isp1/isp_params.c:1322:27: note: (near initialization for ?rkisp1_params_ioctl.vidioc_s_std?) drivers/media/platform/rockchip/isp1/isp_params.c:1323:3: error: ?const struct v4l2_ioctl_ops? has no member named ?vidioc_s_fmt_meta_out?; did you mean ?vidioc_s_fmt_meta_cap??
.vidioc_s_fmt_meta_out = rkisp1_params_g_fmt_meta_out,
^~~~~~~~~~~~~~~~~~~~~
vidioc_s_fmt_meta_cap
drivers/media/platform/rockchip/isp1/isp_params.c:1323:27: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.vidioc_s_fmt_meta_out = rkisp1_params_g_fmt_meta_out,

                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

drivers/media/platform/rockchip/isp1/isp_params.c:1323:27: note: (near initialization for ?rkisp1_params_ioctl.vidioc_querystd?) drivers/media/platform/rockchip/isp1/isp_params.c:1324:3: error: ?const struct v4l2_ioctl_ops? has no member named ?vidioc_try_fmt_meta_out?; did you mean ?vidioc_try_fmt_meta_cap??
.vidioc_try_fmt_meta_out = rkisp1_params_g_fmt_meta_out,
^~~~~~~~~~~~~~~~~~~~~~~
vidioc_try_fmt_meta_cap
drivers/media/platform/rockchip/isp1/isp_params.c:1324:29: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.vidioc_try_fmt_meta_out = rkisp1_params_g_fmt_meta_out,

                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/rockchip/isp1/isp_params.c:1324:29: note: (near initialization for ?rkisp1_params_ioctl.vidioc_enum_input?)
drivers/media/platform/rockchip/isp1/isp_params.c: In function ?rkisp1_params_init_vb2_queue?:
drivers/media/platform/rockchip/isp1/isp_params.c:1462:12: error: ?V4L2_BUF_TYPE_META_OUTPUT? undeclared (first use in this function); did you mean ?V4L2_BUF_TYPE_SDR_OUTPUT??
  q->type = V4L2_BUF_TYPE_META_OUTPUT;
            ^~~~~~~~~~~~~~~~~~~~~~~~~
            V4L2_BUF_TYPE_SDR_OUTPUT

drivers/media/platform/rockchip/isp1/isp_params.c:1462:12: note: each undeclared identifier is reported only once for each function it appears in
CC drivers/media/platform/rockchip/isp1/mipi_dphy_sy.o
drivers/media/platform/rockchip/isp1/isp_params.c: In function ?rkisp1_register_params_vdev?:
drivers/media/platform/rockchip/isp1/isp_params.c:1507:43: error: ?V4L2_CAP_META_OUTPUT? undeclared (first use in this function); did you mean ?V4L2_CAP_VBI_OUTPUT??

  vdev->device_caps = V4L2_CAP_STREAMING | V4L2_CAP_META_OUTPUT;
                                           ^~~~~~~~~~~~~~~~~~~~
                                           V4L2_CAP_VBI_OUTPUT

Thanks,
baruch

Quoted 77 lines

Jacob Chen (12):
media: doc: add document for rkisp1 meta buffer format
media: rkisp1: add Rockchip MIPI Synopsys DPHY driver
media: rkisp1: add Rockchip ISP1 subdev driver
media: rkisp1: add ISP1 statistics driver
media: rkisp1: add ISP1 params driver
media: rkisp1: add capture device driver
media: rkisp1: add rockchip isp1 core driver
dt-bindings: Document the Rockchip ISP1 bindings
dt-bindings: Document the Rockchip MIPI RX D-PHY bindings
ARM: dts: rockchip: add isp node for rk3288
ARM: dts: rockchip: add rx0 mipi-phy for rk3288
MAINTAINERS: add entry for Rockchip ISP1 driver

Jeffy Chen (1):
media: rkisp1: Add user space ABI definitions

Shunqian Zheng (3):
media: videodev2.h, v4l2-ioctl: add rkisp1 meta buffer format
arm64: dts: rockchip: add isp0 node for rk3399
arm64: dts: rockchip: add rx0 mipi-phy for rk3399

Wen Nuan (1):
ARM: dts: rockchip: Add dts mipi-dphy TXRX1 node for rk3288

 .../devicetree/bindings/media/rockchip-isp1.txt    |   69 +
 .../bindings/media/rockchip-mipi-dphy.txt          |   90 +
 Documentation/media/uapi/v4l/meta-formats.rst      |    2 +
 .../media/uapi/v4l/pixfmt-meta-rkisp1-params.rst   |   20 +
 .../media/uapi/v4l/pixfmt-meta-rkisp1-stat.rst     |   18 +
 MAINTAINERS                                        |   10 +
 arch/arm/boot/dts/rk3288.dtsi                      |   33 +
 arch/arm64/boot/dts/rockchip/rk3399.dtsi           |   25 +
 drivers/media/platform/Kconfig                     |   10 +
 drivers/media/platform/Makefile                    |    1 +
 drivers/media/platform/rockchip/isp1/Makefile      |    8 +
 drivers/media/platform/rockchip/isp1/capture.c     | 1751 ++++++++++++++++++++
 drivers/media/platform/rockchip/isp1/capture.h     |  167 ++
 drivers/media/platform/rockchip/isp1/common.h      |  110 ++
 drivers/media/platform/rockchip/isp1/dev.c         |  626 +++++++
 drivers/media/platform/rockchip/isp1/dev.h         |   93 ++
 drivers/media/platform/rockchip/isp1/isp_params.c  | 1539 +++++++++++++++++
 drivers/media/platform/rockchip/isp1/isp_params.h  |   49 +
 drivers/media/platform/rockchip/isp1/isp_stats.c   |  508 ++++++
 drivers/media/platform/rockchip/isp1/isp_stats.h   |   58 +
 .../media/platform/rockchip/isp1/mipi_dphy_sy.c    |  868 ++++++++++
 .../media/platform/rockchip/isp1/mipi_dphy_sy.h    |   15 +
 drivers/media/platform/rockchip/isp1/regs.c        |  239 +++
 drivers/media/platform/rockchip/isp1/regs.h        | 1550 +++++++++++++++++
 drivers/media/platform/rockchip/isp1/rkisp1.c      | 1177 +++++++++++++
 drivers/media/platform/rockchip/isp1/rkisp1.h      |  105 ++
 drivers/media/v4l2-core/v4l2-ioctl.c               |    2 +
 include/uapi/linux/rkisp1-config.h                 |  798 +++++++++
 include/uapi/linux/videodev2.h                     |    4 +
 29 files changed, 9945 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/rockchip-isp1.txt
 create mode 100644 Documentation/devicetree/bindings/media/rockchip-mipi-dphy.txt
 create mode 100644 Documentation/media/uapi/v4l/pixfmt-meta-rkisp1-params.rst
 create mode 100644 Documentation/media/uapi/v4l/pixfmt-meta-rkisp1-stat.rst
 create mode 100644 drivers/media/platform/rockchip/isp1/Makefile
 create mode 100644 drivers/media/platform/rockchip/isp1/capture.c
 create mode 100644 drivers/media/platform/rockchip/isp1/capture.h
 create mode 100644 drivers/media/platform/rockchip/isp1/common.h
 create mode 100644 drivers/media/platform/rockchip/isp1/dev.c
 create mode 100644 drivers/media/platform/rockchip/isp1/dev.h
 create mode 100644 drivers/media/platform/rockchip/isp1/isp_params.c
 create mode 100644 drivers/media/platform/rockchip/isp1/isp_params.h
 create mode 100644 drivers/media/platform/rockchip/isp1/isp_stats.c
 create mode 100644 drivers/media/platform/rockchip/isp1/isp_stats.h
 create mode 100644 drivers/media/platform/rockchip/isp1/mipi_dphy_sy.c
 create mode 100644 drivers/media/platform/rockchip/isp1/mipi_dphy_sy.h
 create mode 100644 drivers/media/platform/rockchip/isp1/regs.c
 create mode 100644 drivers/media/platform/rockchip/isp1/regs.h
 create mode 100644 drivers/media/platform/rockchip/isp1/rkisp1.c
 create mode 100644 drivers/media/platform/rockchip/isp1/rkisp1.h
 create mode 100644 include/uapi/linux/rkisp1-config.h
Quoted 3 lines

--
2.16.1

--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

#46 lore raw

Hi Jacob,

Quoted 11 lines · Jacob Chen

2018-03-08 20:02 GMT+08:00 Baruch Siach <[email protected]>:

Quoted 10 lines · Jacob Chen
Quoted 8 lines

This patch series add a ISP(Camera) v4l2 driver for rockchip rk3288/rk3399 SoC.

Wiki Pages:
http://opensource.rock-chips.com/wiki_Rockchip-isp1

The deprecated g_mbus_config op is not dropped in V6 because i am waiting tomasz's patches.

Quoted 6 lines
Quoted 3 lines

Which tree is this series based on? On top of v4.16-rc4 I get the build failure below. The V4L2_BUF_TYPE_META_OUTPUT macro, for example, is not even in media_tree.git.

This series is based on v4.16-rc4 with below patch.
https://patchwork.kernel.org/patch/9792001/

This patch does not apply on v4.16-rc4. I also tried v2 of this patch with the same result:

https://patchwork.linuxtv.org/patch/44682/

Can you push your series to a public git repo branch?

Thanks,
baruch

Quoted 124 lines
Quoted 124 lines

drivers/media/platform/rockchip/isp1/isp_params.c:1321:3: error: ?const struct v4l2_ioctl_ops? has no member named ?vidioc_enum_fmt_meta_out?; did you mean ?vidioc_enum_fmt_meta_cap??
.vidioc_enum_fmt_meta_out = rkisp1_params_enum_fmt_meta_out,
^~~~~~~~~~~~~~~~~~~~~~~~
vidioc_enum_fmt_meta_cap
drivers/media/platform/rockchip/isp1/isp_params.c:1321:30: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.vidioc_enum_fmt_meta_out = rkisp1_params_enum_fmt_meta_out,

                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

drivers/media/platform/rockchip/isp1/isp_params.c:1321:30: note: (near initialization for ?rkisp1_params_ioctl.vidioc_g_std?) drivers/media/platform/rockchip/isp1/isp_params.c:1322:3: error: ?const struct v4l2_ioctl_ops? has no member named ?vidioc_g_fmt_meta_out?; did you mean ?vidioc_g_fmt_meta_cap??
.vidioc_g_fmt_meta_out = rkisp1_params_g_fmt_meta_out,
^~~~~~~~~~~~~~~~~~~~~
vidioc_g_fmt_meta_cap
drivers/media/platform/rockchip/isp1/isp_params.c:1322:27: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.vidioc_g_fmt_meta_out = rkisp1_params_g_fmt_meta_out,

                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

drivers/media/platform/rockchip/isp1/isp_params.c:1322:27: note: (near initialization for ?rkisp1_params_ioctl.vidioc_s_std?) drivers/media/platform/rockchip/isp1/isp_params.c:1323:3: error: ?const struct v4l2_ioctl_ops? has no member named ?vidioc_s_fmt_meta_out?; did you mean ?vidioc_s_fmt_meta_cap??
.vidioc_s_fmt_meta_out = rkisp1_params_g_fmt_meta_out,
^~~~~~~~~~~~~~~~~~~~~
vidioc_s_fmt_meta_cap
drivers/media/platform/rockchip/isp1/isp_params.c:1323:27: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.vidioc_s_fmt_meta_out = rkisp1_params_g_fmt_meta_out,

                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

drivers/media/platform/rockchip/isp1/isp_params.c:1323:27: note: (near initialization for ?rkisp1_params_ioctl.vidioc_querystd?) drivers/media/platform/rockchip/isp1/isp_params.c:1324:3: error: ?const struct v4l2_ioctl_ops? has no member named ?vidioc_try_fmt_meta_out?; did you mean ?vidioc_try_fmt_meta_cap??
.vidioc_try_fmt_meta_out = rkisp1_params_g_fmt_meta_out,
^~~~~~~~~~~~~~~~~~~~~~~
vidioc_try_fmt_meta_cap
drivers/media/platform/rockchip/isp1/isp_params.c:1324:29: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.vidioc_try_fmt_meta_out = rkisp1_params_g_fmt_meta_out,

                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/rockchip/isp1/isp_params.c:1324:29: note: (near initialization for ?rkisp1_params_ioctl.vidioc_enum_input?)
drivers/media/platform/rockchip/isp1/isp_params.c: In function ?rkisp1_params_init_vb2_queue?:
drivers/media/platform/rockchip/isp1/isp_params.c:1462:12: error: ?V4L2_BUF_TYPE_META_OUTPUT? undeclared (first use in this function); did you mean ?V4L2_BUF_TYPE_SDR_OUTPUT??
  q->type = V4L2_BUF_TYPE_META_OUTPUT;
            ^~~~~~~~~~~~~~~~~~~~~~~~~
            V4L2_BUF_TYPE_SDR_OUTPUT

drivers/media/platform/rockchip/isp1/isp_params.c:1462:12: note: each undeclared identifier is reported only once for each function it appears in
CC drivers/media/platform/rockchip/isp1/mipi_dphy_sy.o
drivers/media/platform/rockchip/isp1/isp_params.c: In function ?rkisp1_register_params_vdev?:
drivers/media/platform/rockchip/isp1/isp_params.c:1507:43: error: ?V4L2_CAP_META_OUTPUT? undeclared (first use in this function); did you mean ?V4L2_CAP_VBI_OUTPUT??

  vdev->device_caps = V4L2_CAP_STREAMING | V4L2_CAP_META_OUTPUT;
                                           ^~~~~~~~~~~~~~~~~~~~
                                           V4L2_CAP_VBI_OUTPUT

Thanks,
baruch

Quoted 76 lines

Jacob Chen (12):
media: doc: add document for rkisp1 meta buffer format
media: rkisp1: add Rockchip MIPI Synopsys DPHY driver
media: rkisp1: add Rockchip ISP1 subdev driver
media: rkisp1: add ISP1 statistics driver
media: rkisp1: add ISP1 params driver
media: rkisp1: add capture device driver
media: rkisp1: add rockchip isp1 core driver
dt-bindings: Document the Rockchip ISP1 bindings
dt-bindings: Document the Rockchip MIPI RX D-PHY bindings
ARM: dts: rockchip: add isp node for rk3288
ARM: dts: rockchip: add rx0 mipi-phy for rk3288
MAINTAINERS: add entry for Rockchip ISP1 driver

Jeffy Chen (1):
media: rkisp1: Add user space ABI definitions

Shunqian Zheng (3):
media: videodev2.h, v4l2-ioctl: add rkisp1 meta buffer format
arm64: dts: rockchip: add isp0 node for rk3399
arm64: dts: rockchip: add rx0 mipi-phy for rk3399

Wen Nuan (1):
ARM: dts: rockchip: Add dts mipi-dphy TXRX1 node for rk3288

 .../devicetree/bindings/media/rockchip-isp1.txt    |   69 +
 .../bindings/media/rockchip-mipi-dphy.txt          |   90 +
 Documentation/media/uapi/v4l/meta-formats.rst      |    2 +
 .../media/uapi/v4l/pixfmt-meta-rkisp1-params.rst   |   20 +
 .../media/uapi/v4l/pixfmt-meta-rkisp1-stat.rst     |   18 +
 MAINTAINERS                                        |   10 +
 arch/arm/boot/dts/rk3288.dtsi                      |   33 +
 arch/arm64/boot/dts/rockchip/rk3399.dtsi           |   25 +
 drivers/media/platform/Kconfig                     |   10 +
 drivers/media/platform/Makefile                    |    1 +
 drivers/media/platform/rockchip/isp1/Makefile      |    8 +
 drivers/media/platform/rockchip/isp1/capture.c     | 1751 ++++++++++++++++++++
 drivers/media/platform/rockchip/isp1/capture.h     |  167 ++
 drivers/media/platform/rockchip/isp1/common.h      |  110 ++
 drivers/media/platform/rockchip/isp1/dev.c         |  626 +++++++
 drivers/media/platform/rockchip/isp1/dev.h         |   93 ++
 drivers/media/platform/rockchip/isp1/isp_params.c  | 1539 +++++++++++++++++
 drivers/media/platform/rockchip/isp1/isp_params.h  |   49 +
 drivers/media/platform/rockchip/isp1/isp_stats.c   |  508 ++++++
 drivers/media/platform/rockchip/isp1/isp_stats.h   |   58 +
 .../media/platform/rockchip/isp1/mipi_dphy_sy.c    |  868 ++++++++++
 .../media/platform/rockchip/isp1/mipi_dphy_sy.h    |   15 +
 drivers/media/platform/rockchip/isp1/regs.c        |  239 +++
 drivers/media/platform/rockchip/isp1/regs.h        | 1550 +++++++++++++++++
 drivers/media/platform/rockchip/isp1/rkisp1.c      | 1177 +++++++++++++
 drivers/media/platform/rockchip/isp1/rkisp1.h      |  105 ++
 drivers/media/v4l2-core/v4l2-ioctl.c               |    2 +
 include/uapi/linux/rkisp1-config.h                 |  798 +++++++++
 include/uapi/linux/videodev2.h                     |    4 +
 29 files changed, 9945 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/rockchip-isp1.txt
 create mode 100644 Documentation/devicetree/bindings/media/rockchip-mipi-dphy.txt
 create mode 100644 Documentation/media/uapi/v4l/pixfmt-meta-rkisp1-params.rst
 create mode 100644 Documentation/media/uapi/v4l/pixfmt-meta-rkisp1-stat.rst
 create mode 100644 drivers/media/platform/rockchip/isp1/Makefile
 create mode 100644 drivers/media/platform/rockchip/isp1/capture.c
 create mode 100644 drivers/media/platform/rockchip/isp1/capture.h
 create mode 100644 drivers/media/platform/rockchip/isp1/common.h
 create mode 100644 drivers/media/platform/rockchip/isp1/dev.c
 create mode 100644 drivers/media/platform/rockchip/isp1/dev.h
 create mode 100644 drivers/media/platform/rockchip/isp1/isp_params.c
 create mode 100644 drivers/media/platform/rockchip/isp1/isp_params.h
 create mode 100644 drivers/media/platform/rockchip/isp1/isp_stats.c
 create mode 100644 drivers/media/platform/rockchip/isp1/isp_stats.h
 create mode 100644 drivers/media/platform/rockchip/isp1/mipi_dphy_sy.c
 create mode 100644 drivers/media/platform/rockchip/isp1/mipi_dphy_sy.h
 create mode 100644 drivers/media/platform/rockchip/isp1/regs.c
 create mode 100644 drivers/media/platform/rockchip/isp1/regs.h
 create mode 100644 drivers/media/platform/rockchip/isp1/rkisp1.c
 create mode 100644 drivers/media/platform/rockchip/isp1/rkisp1.h
 create mode 100644 include/uapi/linux/rkisp1-config.h
Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
#47 lore raw

Hi Baruch,

2018-03-09 12:09 GMT+08:00 Baruch Siach <[email protected]>:

Quoted 18 lines

Hi Jacob,

Quoted 15 lines · Jacob Chen

2018-03-08 20:02 GMT+08:00 Baruch Siach <[email protected]>:

Quoted 13 lines · Jacob Chen
Quoted 8 lines

This patch series add a ISP(Camera) v4l2 driver for rockchip rk3288/rk3399 SoC.

Wiki Pages:
http://opensource.rock-chips.com/wiki_Rockchip-isp1

The deprecated g_mbus_config op is not dropped in V6 because i am waiting tomasz's patches.

Which tree is this series based on? On top of v4.16-rc4 I get the build failure below. The V4L2_BUF_TYPE_META_OUTPUT macro, for example, is not even in media_tree.git.

Quoted 7 lines
Quoted 2 lines

This series is based on v4.16-rc4 with below patch.
https://patchwork.kernel.org/patch/9792001/

This patch does not apply on v4.16-rc4. I also tried v2 of this patch with the same result:

https://patchwork.linuxtv.org/patch/44682/

It need resolve merge conflict.

Quoted 3 lines

Can you push your series to a public git repo branch?

Sure, I have push it to my github.
https://github.com/wzyy2/linux/tree/4.16-rc4

This commit might be a bit of a mess
https://github.com/wzyy2/linux/commit/ff68323c4804adc10f64836ea1be172c54a9d6c6

Quoted 132 lines

Thanks,
baruch

Quoted 116 lines
Quoted 116 lines

drivers/media/platform/rockchip/isp1/isp_params.c:1321:3: error: ?const struct v4l2_ioctl_ops? has no member named ?vidioc_enum_fmt_meta_out?; did you mean ?vidioc_enum_fmt_meta_cap??
.vidioc_enum_fmt_meta_out = rkisp1_params_enum_fmt_meta_out,
^~~~~~~~~~~~~~~~~~~~~~~~
vidioc_enum_fmt_meta_cap
drivers/media/platform/rockchip/isp1/isp_params.c:1321:30: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.vidioc_enum_fmt_meta_out = rkisp1_params_enum_fmt_meta_out,

                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

drivers/media/platform/rockchip/isp1/isp_params.c:1321:30: note: (near initialization for ?rkisp1_params_ioctl.vidioc_g_std?) drivers/media/platform/rockchip/isp1/isp_params.c:1322:3: error: ?const struct v4l2_ioctl_ops? has no member named ?vidioc_g_fmt_meta_out?; did you mean ?vidioc_g_fmt_meta_cap??
.vidioc_g_fmt_meta_out = rkisp1_params_g_fmt_meta_out,
^~~~~~~~~~~~~~~~~~~~~
vidioc_g_fmt_meta_cap
drivers/media/platform/rockchip/isp1/isp_params.c:1322:27: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.vidioc_g_fmt_meta_out = rkisp1_params_g_fmt_meta_out,

                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

drivers/media/platform/rockchip/isp1/isp_params.c:1322:27: note: (near initialization for ?rkisp1_params_ioctl.vidioc_s_std?) drivers/media/platform/rockchip/isp1/isp_params.c:1323:3: error: ?const struct v4l2_ioctl_ops? has no member named ?vidioc_s_fmt_meta_out?; did you mean ?vidioc_s_fmt_meta_cap??
.vidioc_s_fmt_meta_out = rkisp1_params_g_fmt_meta_out,
^~~~~~~~~~~~~~~~~~~~~
vidioc_s_fmt_meta_cap
drivers/media/platform/rockchip/isp1/isp_params.c:1323:27: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.vidioc_s_fmt_meta_out = rkisp1_params_g_fmt_meta_out,

                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

drivers/media/platform/rockchip/isp1/isp_params.c:1323:27: note: (near initialization for ?rkisp1_params_ioctl.vidioc_querystd?) drivers/media/platform/rockchip/isp1/isp_params.c:1324:3: error: ?const struct v4l2_ioctl_ops? has no member named ?vidioc_try_fmt_meta_out?; did you mean ?vidioc_try_fmt_meta_cap??
.vidioc_try_fmt_meta_out = rkisp1_params_g_fmt_meta_out,
^~~~~~~~~~~~~~~~~~~~~~~
vidioc_try_fmt_meta_cap
drivers/media/platform/rockchip/isp1/isp_params.c:1324:29: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.vidioc_try_fmt_meta_out = rkisp1_params_g_fmt_meta_out,

                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/rockchip/isp1/isp_params.c:1324:29: note: (near initialization for ?rkisp1_params_ioctl.vidioc_enum_input?)
drivers/media/platform/rockchip/isp1/isp_params.c: In function ?rkisp1_params_init_vb2_queue?:
drivers/media/platform/rockchip/isp1/isp_params.c:1462:12: error: ?V4L2_BUF_TYPE_META_OUTPUT? undeclared (first use in this function); did you mean ?V4L2_BUF_TYPE_SDR_OUTPUT??
  q->type = V4L2_BUF_TYPE_META_OUTPUT;
            ^~~~~~~~~~~~~~~~~~~~~~~~~
            V4L2_BUF_TYPE_SDR_OUTPUT

drivers/media/platform/rockchip/isp1/isp_params.c:1462:12: note: each undeclared identifier is reported only once for each function it appears in
CC drivers/media/platform/rockchip/isp1/mipi_dphy_sy.o
drivers/media/platform/rockchip/isp1/isp_params.c: In function ?rkisp1_register_params_vdev?:
drivers/media/platform/rockchip/isp1/isp_params.c:1507:43: error: ?V4L2_CAP_META_OUTPUT? undeclared (first use in this function); did you mean ?V4L2_CAP_VBI_OUTPUT??

  vdev->device_caps = V4L2_CAP_STREAMING | V4L2_CAP_META_OUTPUT;
                                           ^~~~~~~~~~~~~~~~~~~~
                                           V4L2_CAP_VBI_OUTPUT

Thanks,
baruch

Quoted 68 lines

Jacob Chen (12):
media: doc: add document for rkisp1 meta buffer format
media: rkisp1: add Rockchip MIPI Synopsys DPHY driver
media: rkisp1: add Rockchip ISP1 subdev driver
media: rkisp1: add ISP1 statistics driver
media: rkisp1: add ISP1 params driver
media: rkisp1: add capture device driver
media: rkisp1: add rockchip isp1 core driver
dt-bindings: Document the Rockchip ISP1 bindings
dt-bindings: Document the Rockchip MIPI RX D-PHY bindings
ARM: dts: rockchip: add isp node for rk3288
ARM: dts: rockchip: add rx0 mipi-phy for rk3288
MAINTAINERS: add entry for Rockchip ISP1 driver

Jeffy Chen (1):
media: rkisp1: Add user space ABI definitions

Shunqian Zheng (3):
media: videodev2.h, v4l2-ioctl: add rkisp1 meta buffer format
arm64: dts: rockchip: add isp0 node for rk3399
arm64: dts: rockchip: add rx0 mipi-phy for rk3399

Wen Nuan (1):
ARM: dts: rockchip: Add dts mipi-dphy TXRX1 node for rk3288

 .../devicetree/bindings/media/rockchip-isp1.txt    |   69 +
 .../bindings/media/rockchip-mipi-dphy.txt          |   90 +
 Documentation/media/uapi/v4l/meta-formats.rst      |    2 +
 .../media/uapi/v4l/pixfmt-meta-rkisp1-params.rst   |   20 +
 .../media/uapi/v4l/pixfmt-meta-rkisp1-stat.rst     |   18 +
 MAINTAINERS                                        |   10 +
 arch/arm/boot/dts/rk3288.dtsi                      |   33 +
 arch/arm64/boot/dts/rockchip/rk3399.dtsi           |   25 +
 drivers/media/platform/Kconfig                     |   10 +
 drivers/media/platform/Makefile                    |    1 +
 drivers/media/platform/rockchip/isp1/Makefile      |    8 +
 drivers/media/platform/rockchip/isp1/capture.c     | 1751 ++++++++++++++++++++
 drivers/media/platform/rockchip/isp1/capture.h     |  167 ++
 drivers/media/platform/rockchip/isp1/common.h      |  110 ++
 drivers/media/platform/rockchip/isp1/dev.c         |  626 +++++++
 drivers/media/platform/rockchip/isp1/dev.h         |   93 ++
 drivers/media/platform/rockchip/isp1/isp_params.c  | 1539 +++++++++++++++++
 drivers/media/platform/rockchip/isp1/isp_params.h  |   49 +
 drivers/media/platform/rockchip/isp1/isp_stats.c   |  508 ++++++
 drivers/media/platform/rockchip/isp1/isp_stats.h   |   58 +
 .../media/platform/rockchip/isp1/mipi_dphy_sy.c    |  868 ++++++++++
 .../media/platform/rockchip/isp1/mipi_dphy_sy.h    |   15 +
 drivers/media/platform/rockchip/isp1/regs.c        |  239 +++
 drivers/media/platform/rockchip/isp1/regs.h        | 1550 +++++++++++++++++
 drivers/media/platform/rockchip/isp1/rkisp1.c      | 1177 +++++++++++++
 drivers/media/platform/rockchip/isp1/rkisp1.h      |  105 ++
 drivers/media/v4l2-core/v4l2-ioctl.c               |    2 +
 include/uapi/linux/rkisp1-config.h                 |  798 +++++++++
 include/uapi/linux/videodev2.h                     |    4 +
 29 files changed, 9945 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/rockchip-isp1.txt
 create mode 100644 Documentation/devicetree/bindings/media/rockchip-mipi-dphy.txt
 create mode 100644 Documentation/media/uapi/v4l/pixfmt-meta-rkisp1-params.rst
 create mode 100644 Documentation/media/uapi/v4l/pixfmt-meta-rkisp1-stat.rst
 create mode 100644 drivers/media/platform/rockchip/isp1/Makefile
 create mode 100644 drivers/media/platform/rockchip/isp1/capture.c
 create mode 100644 drivers/media/platform/rockchip/isp1/capture.h
 create mode 100644 drivers/media/platform/rockchip/isp1/common.h
 create mode 100644 drivers/media/platform/rockchip/isp1/dev.c
 create mode 100644 drivers/media/platform/rockchip/isp1/dev.h
 create mode 100644 drivers/media/platform/rockchip/isp1/isp_params.c
 create mode 100644 drivers/media/platform/rockchip/isp1/isp_params.h
 create mode 100644 drivers/media/platform/rockchip/isp1/isp_stats.c
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
 create mode 100644 drivers/media/platform/rockchip/isp1/isp_stats.h
 create mode 100644 drivers/media/platform/rockchip/isp1/mipi_dphy_sy.c
 create mode 100644 drivers/media/platform/rockchip/isp1/mipi_dphy_sy.h
 create mode 100644 drivers/media/platform/rockchip/isp1/regs.c
 create mode 100644 drivers/media/platform/rockchip/isp1/regs.h
 create mode 100644 drivers/media/platform/rockchip/isp1/rkisp1.c
 create mode 100644 drivers/media/platform/rockchip/isp1/rkisp1.h
 create mode 100644 include/uapi/linux/rkisp1-config.h

--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

#48 lore raw

Hi Jacob,

Quoted 27 lines · Jacob Chen

2018-03-09 12:09 GMT+08:00 Baruch Siach <[email protected]>:

Quoted 16 lines · Jacob Chen
Quoted 15 lines

2018-03-08 20:02 GMT+08:00 Baruch Siach <[email protected]>:

Quoted 13 lines · Jacob Chen
Quoted 8 lines

This patch series add a ISP(Camera) v4l2 driver for rockchip rk3288/rk3399 SoC.

Wiki Pages:
http://opensource.rock-chips.com/wiki_Rockchip-isp1

The deprecated g_mbus_config op is not dropped in V6 because i am waiting tomasz's patches.

Which tree is this series based on? On top of v4.16-rc4 I get the build failure below. The V4L2_BUF_TYPE_META_OUTPUT macro, for example, is not even in media_tree.git.

Quoted 7 lines
Quoted 2 lines

This series is based on v4.16-rc4 with below patch.
https://patchwork.kernel.org/patch/9792001/

This patch does not apply on v4.16-rc4. I also tried v2 of this patch with the same result:

https://patchwork.linuxtv.org/patch/44682/

It need resolve merge conflict.

Quoted 7 lines
Quoted 1 line

Can you push your series to a public git repo branch?

Sure, I have push it to my github.
https://github.com/wzyy2/linux/tree/4.16-rc4

This commit might be a bit of a mess
https://github.com/wzyy2/linux/commit/ff68323c4804adc10f64836ea1be172c54a9d6c6

Thanks. This is very helpful.

I'm mostly interested in the tinkerboard, so the DT bits in your tree are also useful.

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
#49 lore raw
In reply to Jacob Chen

Hi Jacob,

This is getting very close. Besides this round of review comments the main blocker is mbus_config. But Thomasz is looking at that, so I will wait until that is resolved.

Also for your v7 include the patches from Sakari that add Meta Output support.

This patch series relies on those, so it is easiest to review if they are part of the patch series.

Regards,

Hans

Quoted 236 lines · Jacob Chen

From: Jacob Chen <[email protected]>

changes in V6:
- add mipi txrx phy support
- remove bool and enum from uapi header
- add buf_prepare op
- correct some spelling problems
- return all queued buffers when starting stream failed

changes in V5: Sync with local changes,
- fix the SP height limit
- speed up the second stream capture
- the second stream can't force sync for rsz when start/stop streaming
- add frame id to param vb2 buf
- enable luminance maximum threshold

changes in V4:
- fix some bugs during development
- move quantization settings to rkisp1 subdev
- correct some spelling problems
- describe ports in dt-binding documents

changes in V3:
- add some comments
- fix wrong use of v4l2_async_subdev_notifier_register
- optimize two paths capture at a time
- remove compose
- re-struct headers
- add a tmp wiki page: http://opensource.rock-chips.com/wiki_Rockchip-isp1

changes in V2:
mipi-phy:
- use async probing
- make it be a child device of the GRF
isp:
- add dummy buffer
- change the way to get bus configuration, which make it possible to add parallel sensor support in the future(without mipi-phy driver).

This patch series add a ISP(Camera) v4l2 driver for rockchip rk3288/rk3399 SoC.

Wiki Pages:
http://opensource.rock-chips.com/wiki_Rockchip-isp1

The deprecated g_mbus_config op is not dropped in V6 because i am waiting tomasz's patches.

v4l2-compliance for V6(isp params/stats nodes are passed):

v4l2-compliance SHA : 93dc5f20727fede5097d67f8b9adabe4b8046d5b

Compliance test for device /dev/video0:

Driver Info:
Driver name : rkisp1
Card type : rkisp1
Bus info : platform:ff910000.isp
Driver version : 4.16.0
Capabilities : 0x84201000
Video Capture Multiplanar
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04201000
Video Capture Multiplanar
Streaming
Extended Pix Format
Media Driver Info:
Driver name : rkisp1
Model : rkisp1
Serial :
Bus info :
Media version : 4.16.0
Hardware revision: 0x00000000 (0)
Driver version : 4.16.0
Interface Info:
ID : 0x03000007
Type : V4L Video
Entity Info:
ID : 0x00000006 (6)
Name : rkisp1_selfpath
Function : V4L2 I/O
Pad 0x01000009 : Sink
Link 0x02000021: from remote pad 0x1000004 of entity 'rkisp1-isp-subdev': Data, Enabled

Required ioctls:
test MC information (see 'Media Driver Info' above): OK test VIDIOC_QUERYCAP: OK

Allow for multiple opens:
test second /dev/video0 open: OK
test VIDIOC_QUERYCAP: OK
test VIDIOC_G/S_PRIORITY: OK
test for unlimited opens: OK

Debug ioctls:
test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported) test VIDIOC_LOG_STATUS: OK (Not Supported)

Input ioctls:
test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported) test VIDIOC_G/S_FREQUENCY: OK (Not Supported) test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported) test VIDIOC_ENUMAUDIO: OK (Not Supported)
test VIDIOC_G/S/ENUMINPUT: OK
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 1 Audio Inputs: 0 Tuners: 0

Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported) test VIDIOC_G/S_FREQUENCY: OK (Not Supported) test VIDIOC_ENUMAUDOUT: OK (Not Supported) test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported) test VIDIOC_G/S_AUDOUT: OK (Not Supported)
Outputs: 0 Audio Outputs: 0 Modulators: 0

Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported) test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported) test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported) test VIDIOC_G/S_EDID: OK (Not Supported)

Control ioctls (Input 0):
test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK test VIDIOC_QUERYCTRL: OK
test VIDIOC_G/S_CTRL: OK
test VIDIOC_G/S/TRY_EXT_CTRLS: OK test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK test VIDIOC_G/S_JPEGCOMP: OK (Not Supported) Standard Controls: 9 Private Controls: 0

Format ioctls (Input 0):
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
test VIDIOC_G/S_PARM: OK (Not Supported)
test VIDIOC_G_FBUF: OK (Not Supported)
fail: v4l2-test-formats.cpp(330): !colorspace
fail: v4l2-test-formats.cpp(454): testColorspace(pix_mp.pixelformat, pix_mp.colorspace, pix_mp.ycbcr_enc, pix_m
p.quantization)
test VIDIOC_G_FMT: FAIL
test VIDIOC_TRY_FMT: OK (Not Supported)
test VIDIOC_S_FMT: OK (Not Supported)
test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
fail: v4l2-test-formats.cpp(1288): doioctl(node, VIDIOC_G_SELECTION, &sel) != EINVAL
test Cropping: FAIL
test Composing: OK (Not Supported)
test Scaling: OK

Codec ioctls (Input 0):
test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported) test VIDIOC_G_ENC_INDEX: OK (Not Supported) test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)

Buffer ioctls (Input 0):
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
fail: v4l2-test-buffers.cpp(525): VIDIOC_EXPBUF is supported, but the V4L2_MEMORY_MMAP support is missing, prob
ably due to earlier failing format tests.
test VIDIOC_EXPBUF: OK (Not Supported)

Total: 44, Succeeded: 42, Failed: 2, Warnings: 0

Jacob Chen (12):
media: doc: add document for rkisp1 meta buffer format
media: rkisp1: add Rockchip MIPI Synopsys DPHY driver
media: rkisp1: add Rockchip ISP1 subdev driver
media: rkisp1: add ISP1 statistics driver
media: rkisp1: add ISP1 params driver
media: rkisp1: add capture device driver
media: rkisp1: add rockchip isp1 core driver
dt-bindings: Document the Rockchip ISP1 bindings
dt-bindings: Document the Rockchip MIPI RX D-PHY bindings
ARM: dts: rockchip: add isp node for rk3288
ARM: dts: rockchip: add rx0 mipi-phy for rk3288
MAINTAINERS: add entry for Rockchip ISP1 driver

Jeffy Chen (1):
media: rkisp1: Add user space ABI definitions

Shunqian Zheng (3):
media: videodev2.h, v4l2-ioctl: add rkisp1 meta buffer format
arm64: dts: rockchip: add isp0 node for rk3399
arm64: dts: rockchip: add rx0 mipi-phy for rk3399

Wen Nuan (1):
ARM: dts: rockchip: Add dts mipi-dphy TXRX1 node for rk3288

 .../devicetree/bindings/media/rockchip-isp1.txt    |   69 +
 .../bindings/media/rockchip-mipi-dphy.txt          |   90 +
 Documentation/media/uapi/v4l/meta-formats.rst      |    2 +
 .../media/uapi/v4l/pixfmt-meta-rkisp1-params.rst   |   20 +
 .../media/uapi/v4l/pixfmt-meta-rkisp1-stat.rst     |   18 +
 MAINTAINERS                                        |   10 +
 arch/arm/boot/dts/rk3288.dtsi                      |   33 +
 arch/arm64/boot/dts/rockchip/rk3399.dtsi           |   25 +
 drivers/media/platform/Kconfig                     |   10 +
 drivers/media/platform/Makefile                    |    1 +
 drivers/media/platform/rockchip/isp1/Makefile      |    8 +
 drivers/media/platform/rockchip/isp1/capture.c     | 1751 ++++++++++++++++++++
 drivers/media/platform/rockchip/isp1/capture.h     |  167 ++
 drivers/media/platform/rockchip/isp1/common.h      |  110 ++
 drivers/media/platform/rockchip/isp1/dev.c         |  626 +++++++
 drivers/media/platform/rockchip/isp1/dev.h         |   93 ++
 drivers/media/platform/rockchip/isp1/isp_params.c  | 1539 +++++++++++++++++
 drivers/media/platform/rockchip/isp1/isp_params.h  |   49 +
 drivers/media/platform/rockchip/isp1/isp_stats.c   |  508 ++++++
 drivers/media/platform/rockchip/isp1/isp_stats.h   |   58 +
 .../media/platform/rockchip/isp1/mipi_dphy_sy.c    |  868 ++++++++++
 .../media/platform/rockchip/isp1/mipi_dphy_sy.h    |   15 +
 drivers/media/platform/rockchip/isp1/regs.c        |  239 +++
 drivers/media/platform/rockchip/isp1/regs.h        | 1550 +++++++++++++++++
 drivers/media/platform/rockchip/isp1/rkisp1.c      | 1177 +++++++++++++
 drivers/media/platform/rockchip/isp1/rkisp1.h      |  105 ++
 drivers/media/v4l2-core/v4l2-ioctl.c               |    2 +
 include/uapi/linux/rkisp1-config.h                 |  798 +++++++++
 include/uapi/linux/videodev2.h                     |    4 +
 29 files changed, 9945 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/rockchip-isp1.txt
 create mode 100644 Documentation/devicetree/bindings/media/rockchip-mipi-dphy.txt
 create mode 100644 Documentation/media/uapi/v4l/pixfmt-meta-rkisp1-params.rst
 create mode 100644 Documentation/media/uapi/v4l/pixfmt-meta-rkisp1-stat.rst
 create mode 100644 drivers/media/platform/rockchip/isp1/Makefile
 create mode 100644 drivers/media/platform/rockchip/isp1/capture.c
 create mode 100644 drivers/media/platform/rockchip/isp1/capture.h
 create mode 100644 drivers/media/platform/rockchip/isp1/common.h
 create mode 100644 drivers/media/platform/rockchip/isp1/dev.c
 create mode 100644 drivers/media/platform/rockchip/isp1/dev.h
 create mode 100644 drivers/media/platform/rockchip/isp1/isp_params.c
 create mode 100644 drivers/media/platform/rockchip/isp1/isp_params.h
 create mode 100644 drivers/media/platform/rockchip/isp1/isp_stats.c
 create mode 100644 drivers/media/platform/rockchip/isp1/isp_stats.h
 create mode 100644 drivers/media/platform/rockchip/isp1/mipi_dphy_sy.c
 create mode 100644 drivers/media/platform/rockchip/isp1/mipi_dphy_sy.h
 create mode 100644 drivers/media/platform/rockchip/isp1/regs.c
 create mode 100644 drivers/media/platform/rockchip/isp1/regs.h
 create mode 100644 drivers/media/platform/rockchip/isp1/rkisp1.c
 create mode 100644 drivers/media/platform/rockchip/isp1/rkisp1.h
 create mode 100644 include/uapi/linux/rkisp1-config.h
#50 lore raw

PATCH 15/17 arm64: dts: rockchip: add isp0 node for rk3399

In reply to Jacob Chen

rk3399 have two ISP, but we havn't test isp1, so just add isp0 at present.

---
 arch/arm64/boot/dts/rockchip/rk3399.dtsi | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
arch/arm64/boot/dts/rockchip/rk3399.dtsi +18 -0
index 2605118..5729786 100644
@@ -1614,6 +1614,24 @@
 		status = "disabled";
 	};
 
+	isp0: isp0@ff910000 {
+		compatible = "rockchip,rk3399-cif-isp";
+		reg = <0x0 0xff910000 0x0 0x4000>;
+		interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH 0>;
+		clocks = <&cru SCLK_ISP0>,
+			 <&cru ACLK_ISP0>, <&cru ACLK_ISP0_WRAPPER>,
+			 <&cru HCLK_ISP0>, <&cru HCLK_ISP0_WRAPPER>;
+		clock-names = "clk_isp",
+			      "aclk_isp", "aclk_isp_wrap",
+			      "hclk_isp", "hclk_isp_wrap";
+		assigned-clocks = <&cru SCLK_ISP0>, <&cru ACLK_ISP0>;
+		assigned-clock-rates = <500000000>, <400000000>;
+
+		power-domains = <&power RK3399_PD_ISP0>;
+		iommus = <&isp0_mmu>;
+		status = "disabled";
+	};
+
 	isp0_mmu: iommu@ff914000 {
 		compatible = "rockchip,iommu";
 		reg = <0x0 0xff914000 0x0 0x100>, <0x0 0xff915000 0x0 0x100>;
Signature · 1 line
1.9.1
#51 lore raw

Re: [v6-1,15/17] arm64: dts: rockchip: add isp0 node for rk3399

Ah, sorry, I used a wrong Message-Id in In-reply-to, please ignore this one.

Sorry about that.

Quoted 37 lines · Shunqian Zheng

rk3399 have two ISP, but we havn't test isp1, so just add isp0 at present.

---
  arch/arm64/boot/dts/rockchip/rk3399.dtsi | 18 ++++++++++++++++++
  1 file changed, 18 insertions(+)
arch/arm64/boot/dts/rockchip/rk3399.dtsi +18 -0
index 2605118..5729786 100644
@@ -1614,6 +1614,24 @@
  		status = "disabled";
  	};
 
+	isp0: isp0@ff910000 {
+		compatible = "rockchip,rk3399-cif-isp";
+		reg = <0x0 0xff910000 0x0 0x4000>;
+		interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH 0>;
+		clocks = <&cru SCLK_ISP0>,
+			 <&cru ACLK_ISP0>, <&cru ACLK_ISP0_WRAPPER>,
+			 <&cru HCLK_ISP0>, <&cru HCLK_ISP0_WRAPPER>;
+		clock-names = "clk_isp",
+			      "aclk_isp", "aclk_isp_wrap",
+			      "hclk_isp", "hclk_isp_wrap";
+		assigned-clocks = <&cru SCLK_ISP0>, <&cru ACLK_ISP0>;
+		assigned-clock-rates = <500000000>, <400000000>;
+
+		power-domains = <&power RK3399_PD_ISP0>;
+		iommus = <&isp0_mmu>;
+		status = "disabled";
+	};
+
  	isp0_mmu: iommu@ff914000 {
  		compatible = "rockchip,iommu";
  		reg = <0x0 0xff914000 0x0 0x100>, <0x0 0xff915000 0x0 0x100>;
#52 lore raw
In reply to Jacob Chen

Hi Jacob,

What is the status of this patch series? I haven't seen any updates for quite some time now, and I thought that it was getting close.

It would be nice to see this go in.

Regards,

Hans

Quoted 236 lines · Jacob Chen

From: Jacob Chen <[email protected]>

changes in V6:
- add mipi txrx phy support
- remove bool and enum from uapi header
- add buf_prepare op
- correct some spelling problems
- return all queued buffers when starting stream failed

changes in V5: Sync with local changes,
- fix the SP height limit
- speed up the second stream capture
- the second stream can't force sync for rsz when start/stop streaming
- add frame id to param vb2 buf
- enable luminance maximum threshold

changes in V4:
- fix some bugs during development
- move quantization settings to rkisp1 subdev
- correct some spelling problems
- describe ports in dt-binding documents

changes in V3:
- add some comments
- fix wrong use of v4l2_async_subdev_notifier_register
- optimize two paths capture at a time
- remove compose
- re-struct headers
- add a tmp wiki page: http://opensource.rock-chips.com/wiki_Rockchip-isp1

changes in V2:
mipi-phy:
- use async probing
- make it be a child device of the GRF
isp:
- add dummy buffer
- change the way to get bus configuration, which make it possible to add parallel sensor support in the future(without mipi-phy driver).

This patch series add a ISP(Camera) v4l2 driver for rockchip rk3288/rk3399 SoC.

Wiki Pages:
http://opensource.rock-chips.com/wiki_Rockchip-isp1

The deprecated g_mbus_config op is not dropped in V6 because i am waiting tomasz's patches.

v4l2-compliance for V6(isp params/stats nodes are passed):

v4l2-compliance SHA : 93dc5f20727fede5097d67f8b9adabe4b8046d5b

Compliance test for device /dev/video0:

Driver Info:
Driver name : rkisp1
Card type : rkisp1
Bus info : platform:ff910000.isp
Driver version : 4.16.0
Capabilities : 0x84201000
Video Capture Multiplanar
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04201000
Video Capture Multiplanar
Streaming
Extended Pix Format
Media Driver Info:
Driver name : rkisp1
Model : rkisp1
Serial :
Bus info :
Media version : 4.16.0
Hardware revision: 0x00000000 (0)
Driver version : 4.16.0
Interface Info:
ID : 0x03000007
Type : V4L Video
Entity Info:
ID : 0x00000006 (6)
Name : rkisp1_selfpath
Function : V4L2 I/O
Pad 0x01000009 : Sink
Link 0x02000021: from remote pad 0x1000004 of entity 'rkisp1-isp-subdev': Data, Enabled

Required ioctls:
test MC information (see 'Media Driver Info' above): OK test VIDIOC_QUERYCAP: OK

Allow for multiple opens:
test second /dev/video0 open: OK
test VIDIOC_QUERYCAP: OK
test VIDIOC_G/S_PRIORITY: OK
test for unlimited opens: OK

Debug ioctls:
test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported) test VIDIOC_LOG_STATUS: OK (Not Supported)

Input ioctls:
test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported) test VIDIOC_G/S_FREQUENCY: OK (Not Supported) test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported) test VIDIOC_ENUMAUDIO: OK (Not Supported)
test VIDIOC_G/S/ENUMINPUT: OK
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 1 Audio Inputs: 0 Tuners: 0

Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported) test VIDIOC_G/S_FREQUENCY: OK (Not Supported) test VIDIOC_ENUMAUDOUT: OK (Not Supported) test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported) test VIDIOC_G/S_AUDOUT: OK (Not Supported)
Outputs: 0 Audio Outputs: 0 Modulators: 0

Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported) test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported) test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported) test VIDIOC_G/S_EDID: OK (Not Supported)

Control ioctls (Input 0):
test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK test VIDIOC_QUERYCTRL: OK
test VIDIOC_G/S_CTRL: OK
test VIDIOC_G/S/TRY_EXT_CTRLS: OK test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK test VIDIOC_G/S_JPEGCOMP: OK (Not Supported) Standard Controls: 9 Private Controls: 0

Format ioctls (Input 0):
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
test VIDIOC_G/S_PARM: OK (Not Supported)
test VIDIOC_G_FBUF: OK (Not Supported)
fail: v4l2-test-formats.cpp(330): !colorspace
fail: v4l2-test-formats.cpp(454): testColorspace(pix_mp.pixelformat, pix_mp.colorspace, pix_mp.ycbcr_enc, pix_m
p.quantization)
test VIDIOC_G_FMT: FAIL
test VIDIOC_TRY_FMT: OK (Not Supported)
test VIDIOC_S_FMT: OK (Not Supported)
test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
fail: v4l2-test-formats.cpp(1288): doioctl(node, VIDIOC_G_SELECTION, &sel) != EINVAL
test Cropping: FAIL
test Composing: OK (Not Supported)
test Scaling: OK

Codec ioctls (Input 0):
test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported) test VIDIOC_G_ENC_INDEX: OK (Not Supported) test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)

Buffer ioctls (Input 0):
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
fail: v4l2-test-buffers.cpp(525): VIDIOC_EXPBUF is supported, but the V4L2_MEMORY_MMAP support is missing, prob
ably due to earlier failing format tests.
test VIDIOC_EXPBUF: OK (Not Supported)

Total: 44, Succeeded: 42, Failed: 2, Warnings: 0

Jacob Chen (12):
media: doc: add document for rkisp1 meta buffer format
media: rkisp1: add Rockchip MIPI Synopsys DPHY driver
media: rkisp1: add Rockchip ISP1 subdev driver
media: rkisp1: add ISP1 statistics driver
media: rkisp1: add ISP1 params driver
media: rkisp1: add capture device driver
media: rkisp1: add rockchip isp1 core driver
dt-bindings: Document the Rockchip ISP1 bindings
dt-bindings: Document the Rockchip MIPI RX D-PHY bindings
ARM: dts: rockchip: add isp node for rk3288
ARM: dts: rockchip: add rx0 mipi-phy for rk3288
MAINTAINERS: add entry for Rockchip ISP1 driver

Jeffy Chen (1):
media: rkisp1: Add user space ABI definitions

Shunqian Zheng (3):
media: videodev2.h, v4l2-ioctl: add rkisp1 meta buffer format
arm64: dts: rockchip: add isp0 node for rk3399
arm64: dts: rockchip: add rx0 mipi-phy for rk3399

Wen Nuan (1):
ARM: dts: rockchip: Add dts mipi-dphy TXRX1 node for rk3288

 .../devicetree/bindings/media/rockchip-isp1.txt    |   69 +
 .../bindings/media/rockchip-mipi-dphy.txt          |   90 +
 Documentation/media/uapi/v4l/meta-formats.rst      |    2 +
 .../media/uapi/v4l/pixfmt-meta-rkisp1-params.rst   |   20 +
 .../media/uapi/v4l/pixfmt-meta-rkisp1-stat.rst     |   18 +
 MAINTAINERS                                        |   10 +
 arch/arm/boot/dts/rk3288.dtsi                      |   33 +
 arch/arm64/boot/dts/rockchip/rk3399.dtsi           |   25 +
 drivers/media/platform/Kconfig                     |   10 +
 drivers/media/platform/Makefile                    |    1 +
 drivers/media/platform/rockchip/isp1/Makefile      |    8 +
 drivers/media/platform/rockchip/isp1/capture.c     | 1751 ++++++++++++++++++++
 drivers/media/platform/rockchip/isp1/capture.h     |  167 ++
 drivers/media/platform/rockchip/isp1/common.h      |  110 ++
 drivers/media/platform/rockchip/isp1/dev.c         |  626 +++++++
 drivers/media/platform/rockchip/isp1/dev.h         |   93 ++
 drivers/media/platform/rockchip/isp1/isp_params.c  | 1539 +++++++++++++++++
 drivers/media/platform/rockchip/isp1/isp_params.h  |   49 +
 drivers/media/platform/rockchip/isp1/isp_stats.c   |  508 ++++++
 drivers/media/platform/rockchip/isp1/isp_stats.h   |   58 +
 .../media/platform/rockchip/isp1/mipi_dphy_sy.c    |  868 ++++++++++
 .../media/platform/rockchip/isp1/mipi_dphy_sy.h    |   15 +
 drivers/media/platform/rockchip/isp1/regs.c        |  239 +++
 drivers/media/platform/rockchip/isp1/regs.h        | 1550 +++++++++++++++++
 drivers/media/platform/rockchip/isp1/rkisp1.c      | 1177 +++++++++++++
 drivers/media/platform/rockchip/isp1/rkisp1.h      |  105 ++
 drivers/media/v4l2-core/v4l2-ioctl.c               |    2 +
 include/uapi/linux/rkisp1-config.h                 |  798 +++++++++
 include/uapi/linux/videodev2.h                     |    4 +
 29 files changed, 9945 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/rockchip-isp1.txt
 create mode 100644 Documentation/devicetree/bindings/media/rockchip-mipi-dphy.txt
 create mode 100644 Documentation/media/uapi/v4l/pixfmt-meta-rkisp1-params.rst
 create mode 100644 Documentation/media/uapi/v4l/pixfmt-meta-rkisp1-stat.rst
 create mode 100644 drivers/media/platform/rockchip/isp1/Makefile
 create mode 100644 drivers/media/platform/rockchip/isp1/capture.c
 create mode 100644 drivers/media/platform/rockchip/isp1/capture.h
 create mode 100644 drivers/media/platform/rockchip/isp1/common.h
 create mode 100644 drivers/media/platform/rockchip/isp1/dev.c
 create mode 100644 drivers/media/platform/rockchip/isp1/dev.h
 create mode 100644 drivers/media/platform/rockchip/isp1/isp_params.c
 create mode 100644 drivers/media/platform/rockchip/isp1/isp_params.h
 create mode 100644 drivers/media/platform/rockchip/isp1/isp_stats.c
 create mode 100644 drivers/media/platform/rockchip/isp1/isp_stats.h
 create mode 100644 drivers/media/platform/rockchip/isp1/mipi_dphy_sy.c
 create mode 100644 drivers/media/platform/rockchip/isp1/mipi_dphy_sy.h
 create mode 100644 drivers/media/platform/rockchip/isp1/regs.c
 create mode 100644 drivers/media/platform/rockchip/isp1/regs.h
 create mode 100644 drivers/media/platform/rockchip/isp1/rkisp1.c
 create mode 100644 drivers/media/platform/rockchip/isp1/rkisp1.h
 create mode 100644 include/uapi/linux/rkisp1-config.h
#53 lore raw

Hi Hans,

Quoted 7 lines · Hans Verkuil

Hi Jacob,

What is the status of this patch series? I haven't seen any updates for quite some time now, and I thought that it was getting close.

It would be nice to see this go in.

AFAIK, Jacob has left the project. +william.hu at rock-chips.com , who has been working on addressing the remaining comments for a while.

Best regards,
Tomasz

maintainer
#54 lore raw

Am Montag, 3. September 2018, 15:50:20 CEST schrieb Tomasz Figa:

Quoted 6 lines

Hi Hans,

Quoted 3 lines · Hans Verkuil

Hi Jacob,

Quoted 7 lines
Quoted 4 lines

What is the status of this patch series? I haven't seen any updates for quite some time now, and I thought that it was getting close.

It would be nice to see this go in.

AFAIK, Jacob has left the project. +william.hu at rock-chips.com , who has been working on addressing the remaining comments for a while.

also I think Ezequiel has spent time on the vpu driver.