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

2018-03-11 Thread Shunqian Zheng
Ah, sorry, I used a wrong Message-Id in In-reply-to, please ignore this one. Sorry about that. On 2018年03月12日 11:37, Shunqian Zheng wrote: rk3399 have two ISP, but we havn't test isp1, so just add isp0 at present. Signed-off-by: Shunqian Zheng <zhen...@rock-chips.com> Signed-off-by:

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

2018-03-11 Thread Shunqian Zheng
Ah, sorry, I used a wrong Message-Id in In-reply-to, please ignore this one. Sorry about that. On 2018年03月12日 11:37, Shunqian Zheng wrote: rk3399 have two ISP, but we havn't test isp1, so just add isp0 at present. Signed-off-by: Shunqian Zheng Signed-off-by: Jacob Chen --- arch/arm64

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

2018-03-11 Thread Shunqian Zheng
rk3399 have two ISP, but we havn't test isp1, so just add isp0 at present. Signed-off-by: Shunqian Zheng <zhen...@rock-chips.com> Signed-off-by: Jacob Chen <jacob2.c...@rock-chips.com> --- arch/arm64/boot/dts/rockchip/rk3399.dtsi | 18 ++ 1 file changed, 18 inserti

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

2018-03-11 Thread Shunqian Zheng
rk3399 have two ISP, but we havn't test isp1, so just add isp0 at present. Signed-off-by: Shunqian Zheng Signed-off-by: Jacob Chen --- arch/arm64/boot/dts/rockchip/rk3399.dtsi | 18 ++ 1 file changed, 18 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b

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

2018-03-11 Thread Shunqian Zheng
rk3399 have two ISP, but we havn't test isp1, so just add isp0 at present. Signed-off-by: Shunqian Zheng <zhen...@rock-chips.com> Signed-off-by: Jacob Chen <jacob2.c...@rock-chips.com> --- arch/arm64/boot/dts/rockchip/rk3399.dtsi | 18 ++ 1 file changed, 18 inserti

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

2018-03-11 Thread Shunqian Zheng
rk3399 have two ISP, but we havn't test isp1, so just add isp0 at present. Signed-off-by: Shunqian Zheng Signed-off-by: Jacob Chen --- arch/arm64/boot/dts/rockchip/rk3399.dtsi | 18 ++ 1 file changed, 18 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b

[PATCH] arm64: dts: rockchip: assign clock rate for ACLK_VIO

2018-03-11 Thread Shunqian Zheng
one board may override cru node and set the CPLL to 1.6 GHz. On that board it will be very important to be explicit about aclk-vio being 400 MHz. Signed-off-by: Shunqian Zheng <zhen...@rock-chips.com> --- arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi | 6 -- arch/arm64/boot/dts/rockchip/

[PATCH] arm64: dts: rockchip: assign clock rate for ACLK_VIO

2018-03-11 Thread Shunqian Zheng
one board may override cru node and set the CPLL to 1.6 GHz. On that board it will be very important to be explicit about aclk-vio being 400 MHz. Signed-off-by: Shunqian Zheng --- arch/arm64/boot/dts/rockchip/rk3399-gru.dtsi | 6 -- arch/arm64/boot/dts/rockchip/rk3399.dtsi | 6 -- 2

[PATCH v5 01/16] media: videodev2.h, v4l2-ioctl: add rkisp1 meta buffer format

2017-12-29 Thread Shunqian Zheng
Add the Rockchip ISP1 specific processing parameter format V4L2_META_FMT_RK_ISP1_PARAMS and metadata format V4L2_META_FMT_RK_ISP1_STAT_3A for 3A. Signed-off-by: Shunqian Zheng <zhen...@rock-chips.com> Signed-off-by: Jacob Chen <jacob2.c...@rock-chips.com> --- drivers/media/v4l2-core/

[PATCH v5 01/16] media: videodev2.h, v4l2-ioctl: add rkisp1 meta buffer format

2017-12-29 Thread Shunqian Zheng
Add the Rockchip ISP1 specific processing parameter format V4L2_META_FMT_RK_ISP1_PARAMS and metadata format V4L2_META_FMT_RK_ISP1_STAT_3A for 3A. Signed-off-by: Shunqian Zheng Signed-off-by: Jacob Chen --- drivers/media/v4l2-core/v4l2-ioctl.c | 2 ++ include/uapi/linux/videodev2.h | 4

[PATCH v5 05/16] media: rkisp1: add Rockchip ISP1 subdev driver

2017-12-29 Thread Shunqian Zheng
From: Jacob Chen <jacob2.c...@rock-chips.com> Add the subdev driver for rockchip isp1. Signed-off-by: Jacob Chen <jacob2.c...@rock-chips.com> Signed-off-by: Shunqian Zheng <zhen...@rock-chips.com> Signed-off-by: Yichong Zhong <z...@rock-chips.com> Signed-off-by: Jacob C

[PATCH v5 05/16] media: rkisp1: add Rockchip ISP1 subdev driver

2017-12-29 Thread Shunqian Zheng
From: Jacob Chen Add the subdev driver for rockchip isp1. Signed-off-by: Jacob Chen Signed-off-by: Shunqian Zheng Signed-off-by: Yichong Zhong Signed-off-by: Jacob Chen Signed-off-by: Eddie Cai Signed-off-by: Jeffy Chen Signed-off-by: Allon Huang Signed-off-by: Tomasz Figa --- drivers

[PATCH v5 09/16] media: rkisp1: add rockchip isp1 core driver

2017-12-29 Thread Shunqian Zheng
From: Jacob Chen <jacob2.c...@rock-chips.com> Add the core driver for rockchip isp1. Signed-off-by: Jacob Chen <jacob2.c...@rock-chips.com> Signed-off-by: Shunqian Zheng <zhen...@rock-chips.com> Signed-off-by: Yichong Zhong <z...@rock-chips.com> Signed-off-by: Jacob C

[PATCH v5 09/16] media: rkisp1: add rockchip isp1 core driver

2017-12-29 Thread Shunqian Zheng
From: Jacob Chen Add the core driver for rockchip isp1. Signed-off-by: Jacob Chen Signed-off-by: Shunqian Zheng Signed-off-by: Yichong Zhong Signed-off-by: Jacob Chen Signed-off-by: Eddie Cai Signed-off-by: Jeffy Chen Signed-off-by: Allon Huang Signed-off-by: Tomasz Figa --- drivers

[PATCH v5 10/16] dt-bindings: Document the Rockchip ISP1 bindings

2017-12-29 Thread Shunqian Zheng
From: Jacob Chen Add DT bindings documentation for Rockchip ISP1 Signed-off-by: Jacob Chen Reviewed-by: Rob Herring --- .../devicetree/bindings/media/rockchip-isp1.txt| 69 ++ 1 file changed, 69

[PATCH v5 10/16] dt-bindings: Document the Rockchip ISP1 bindings

2017-12-29 Thread Shunqian Zheng
From: Jacob Chen Add DT bindings documentation for Rockchip ISP1 Signed-off-by: Jacob Chen Reviewed-by: Rob Herring --- .../devicetree/bindings/media/rockchip-isp1.txt| 69 ++ 1 file changed, 69 insertions(+) create mode 100644

[PATCH v5 11/16] dt-bindings: Document the Rockchip MIPI RX D-PHY bindings

2017-12-29 Thread Shunqian Zheng
From: Jacob Chen Add DT bindings documentation for Rockchip MIPI D-PHY RX Signed-off-by: Jacob Chen Reviewed-by: Rob Herring --- .../bindings/media/rockchip-mipi-dphy.txt | 88 ++ 1 file

[PATCH v5 14/16] arm64: dts: rockchip: add isp0 node for rk3399

2017-12-29 Thread Shunqian Zheng
rk3399 have two ISP, but we havn't test isp1, so just add isp0 at present. Signed-off-by: Shunqian Zheng <zhen...@rock-chips.com> Signed-off-by: Jacob Chen <jacob2.c...@rock-chips.com> --- arch/arm64/boot/dts/rockchip/rk3399.dtsi | 15 +++ 1 file changed, 15 insertions(+)

[PATCH v5 11/16] dt-bindings: Document the Rockchip MIPI RX D-PHY bindings

2017-12-29 Thread Shunqian Zheng
From: Jacob Chen Add DT bindings documentation for Rockchip MIPI D-PHY RX Signed-off-by: Jacob Chen Reviewed-by: Rob Herring --- .../bindings/media/rockchip-mipi-dphy.txt | 88 ++ 1 file changed, 88 insertions(+) create mode 100644

[PATCH v5 14/16] arm64: dts: rockchip: add isp0 node for rk3399

2017-12-29 Thread Shunqian Zheng
rk3399 have two ISP, but we havn't test isp1, so just add isp0 at present. Signed-off-by: Shunqian Zheng Signed-off-by: Jacob Chen --- arch/arm64/boot/dts/rockchip/rk3399.dtsi | 15 +++ 1 file changed, 15 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch

[PATCH v5 16/16] MAINTAINERS: add entry for Rockchip ISP1 driver

2017-12-28 Thread Shunqian Zheng
+ROCKCHIP ISP V1 DRIVER +M: Jacob chen <jacob2.c...@rock-chips.com> +M: Shunqian Zheng <zhen...@rock-chips.com> +M: Yichong Zhong <z...@rock-chips.com> +L: linux-me...@vger.kernel.org +S: Maintained +F: drivers/media/platform/rockchip/isp1/ +F: Doc

[PATCH v5 16/16] MAINTAINERS: add entry for Rockchip ISP1 driver

2017-12-28 Thread Shunqian Zheng
a/MAINTAINERS b/MAINTAINERS index 85773bf..b97bc25 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -11668,6 +11668,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 +M: Shunqian

[PATCH v5 13/16] ARM: dts: rockchip: add rx0 mipi-phy for rk3288

2017-12-28 Thread Shunqian Zheng
From: Jacob Chen It's a Designware MIPI D-PHY, used by ISP in rk3288. Signed-off-by: Jacob Chen --- arch/arm/boot/dts/rk3288.dtsi | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/boot/dts/rk3288.dtsi

[PATCH v5 13/16] ARM: dts: rockchip: add rx0 mipi-phy for rk3288

2017-12-28 Thread Shunqian Zheng
From: Jacob Chen It's a Designware MIPI D-PHY, used by ISP in rk3288. Signed-off-by: Jacob Chen --- arch/arm/boot/dts/rk3288.dtsi | 7 +++ 1 file changed, 7 insertions(+) diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi index 5dbfafb..a4c9a6e 100644 ---

[PATCH v5 15/16] arm64: dts: rockchip: add rx0 mipi-phy for rk3399

2017-12-28 Thread Shunqian Zheng
It's a Designware MIPI D-PHY, used for ISP0 in rk3399. Signed-off-by: Shunqian Zheng <zhen...@rock-chips.com> Signed-off-by: Jacob Chen <jacob2.c...@rock-chips.com> --- arch/arm64/boot/dts/rockchip/rk3399.dtsi | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/ar

[PATCH v5 15/16] arm64: dts: rockchip: add rx0 mipi-phy for rk3399

2017-12-28 Thread Shunqian Zheng
It's a Designware MIPI D-PHY, used for ISP0 in rk3399. Signed-off-by: Shunqian Zheng Signed-off-by: Jacob Chen --- arch/arm64/boot/dts/rockchip/rk3399.dtsi | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip

[PATCH v5 07/16] media: rkisp1: add ISP1 params driver

2017-12-28 Thread Shunqian Zheng
From: Jacob Chen <jacob2.c...@rock-chips.com> Add the output video driver that accept params from userspace. Signed-off-by: Jacob Chen <jacob2.c...@rock-chips.com> Signed-off-by: Shunqian Zheng <zhen...@rock-chips.com> Signed-off-by: Yichong Zhong <z...@rock-chips.com> S

[PATCH v5 04/16] media: rkisp1: add Rockchip MIPI Synopsys DPHY driver

2017-12-28 Thread Shunqian Zheng
From: Jacob Chen <jacob2.c...@rock-chips.com> This commit adds a subdev driver for Rockchip MIPI Synopsys DPHY driver Signed-off-by: Jacob Chen <jacob2.c...@rock-chips.com> Signed-off-by: Shunqian Zheng <zhen...@rock-chips.com> Signed-off-by: Tomasz Figa <tf...@chromiu

[PATCH v5 00/16] Rockchip ISP1 Driver

2017-12-28 Thread Shunqian Zheng
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

[PATCH v5 07/16] media: rkisp1: add ISP1 params driver

2017-12-28 Thread Shunqian Zheng
From: Jacob Chen Add the output video driver that accept params from userspace. Signed-off-by: Jacob Chen Signed-off-by: Shunqian Zheng Signed-off-by: Yichong Zhong Signed-off-by: Jacob Chen Signed-off-by: Eddie Cai Signed-off-by: Jeffy Chen Signed-off-by: Allon Huang Signed-off

[PATCH v5 04/16] media: rkisp1: add Rockchip MIPI Synopsys DPHY driver

2017-12-28 Thread Shunqian Zheng
From: Jacob Chen This commit adds a subdev driver for Rockchip MIPI Synopsys DPHY driver Signed-off-by: Jacob Chen Signed-off-by: Shunqian Zheng Signed-off-by: Tomasz Figa --- .../media/platform/rockchip/isp1/mipi_dphy_sy.c| 787 + 1 file changed, 787 insertions

[PATCH v5 00/16] Rockchip ISP1 Driver

2017-12-28 Thread Shunqian Zheng
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

[PATCH v5 06/16] media: rkisp1: add ISP1 statistics driver

2017-12-28 Thread Shunqian Zheng
From: Jacob Chen <jacob2.c...@rock-chips.com> Add the capture video driver for rockchip isp1 statistics block. Signed-off-by: Jacob Chen <jacob2.c...@rock-chips.com> Signed-off-by: Shunqian Zheng <zhen...@rock-chips.com> Signed-off-by: Yichong Zhong <z...@rock-chips.com&

[PATCH v5 08/16] media: rkisp1: add capture device driver

2017-12-28 Thread Shunqian Zheng
From: Jacob Chen <jacob2.c...@rock-chips.com> This is the capture device interface driver that provides the v4l2 user interface. Frames can be received from ISP1. Signed-off-by: Jacob Chen <jacob2.c...@rock-chips.com> Signed-off-by: Shunqian Zheng <zhen...@rock-chips.com> Sign

[PATCH v5 02/16] media: doc: add document for rkisp1 meta buffer format

2017-12-28 Thread Shunqian Zheng
From: Jacob Chen This commit add docuemnt for rkisp1 meta buffer format Signed-off-by: Jacob Chen --- Documentation/media/uapi/v4l/meta-formats.rst | 2 ++ .../media/uapi/v4l/pixfmt-meta-rkisp1-params.rst | 17

[PATCH v5 12/16] ARM: dts: rockchip: add isp node for rk3288

2017-12-28 Thread Shunqian Zheng
From: Jacob Chen rk3288 have a Embedded 13M ISP Signed-off-by: Jacob Chen --- arch/arm/boot/dts/rk3288.dtsi | 17 + 1 file changed, 17 insertions(+) diff --git a/arch/arm/boot/dts/rk3288.dtsi

[PATCH v5 03/16] media: rkisp1: Add user space ABI definitions

2017-12-28 Thread Shunqian Zheng
From: Jeffy Chen Add the header for userspace Signed-off-by: Jeffy Chen Signed-off-by: Jacob Chen --- include/uapi/linux/rkisp1-config.h | 757 + 1 file changed, 757

[PATCH v5 06/16] media: rkisp1: add ISP1 statistics driver

2017-12-28 Thread Shunqian Zheng
From: Jacob Chen Add the capture video driver for rockchip isp1 statistics block. Signed-off-by: Jacob Chen Signed-off-by: Shunqian Zheng Signed-off-by: Yichong Zhong Signed-off-by: Jacob Chen Signed-off-by: Eddie Cai Signed-off-by: Jeffy Chen Signed-off-by: Allon Huang Signed-off

[PATCH v5 08/16] media: rkisp1: add capture device driver

2017-12-28 Thread Shunqian Zheng
From: Jacob Chen This is the capture device interface driver that provides the v4l2 user interface. Frames can be received from ISP1. Signed-off-by: Jacob Chen Signed-off-by: Shunqian Zheng Signed-off-by: Yichong Zhong Signed-off-by: Jacob Chen Signed-off-by: Eddie Cai Signed-off-by: Jeffy

[PATCH v5 02/16] media: doc: add document for rkisp1 meta buffer format

2017-12-28 Thread Shunqian Zheng
From: Jacob Chen This commit add docuemnt for rkisp1 meta buffer format Signed-off-by: Jacob Chen --- Documentation/media/uapi/v4l/meta-formats.rst | 2 ++ .../media/uapi/v4l/pixfmt-meta-rkisp1-params.rst | 17 + .../media/uapi/v4l/pixfmt-meta-rkisp1-stat.rst

[PATCH v5 12/16] ARM: dts: rockchip: add isp node for rk3288

2017-12-28 Thread Shunqian Zheng
From: Jacob Chen rk3288 have a Embedded 13M ISP Signed-off-by: Jacob Chen --- arch/arm/boot/dts/rk3288.dtsi | 17 + 1 file changed, 17 insertions(+) diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi index cd24894..5dbfafb 100644 ---

[PATCH v5 03/16] media: rkisp1: Add user space ABI definitions

2017-12-28 Thread Shunqian Zheng
From: Jeffy Chen Add the header for userspace Signed-off-by: Jeffy Chen Signed-off-by: Jacob Chen --- include/uapi/linux/rkisp1-config.h | 757 + 1 file changed, 757 insertions(+) create mode 100644 include/uapi/linux/rkisp1-config.h diff --git

[PATCH] clk: rockchip: add 2016M to big cpu clk rate table

2016-08-31 Thread Shunqian Zheng
We would prefer the 2016M as 2.0G than 1992M which seems odd, adding it to big cpu clk rate table then we can set 2016M in dts. Signed-off-by: Shunqian Zheng <zhen...@rock-chips.com> --- drivers/clk/rockchip/clk-rk3399.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/ro

[PATCH] clk: rockchip: add 2016M to big cpu clk rate table

2016-08-31 Thread Shunqian Zheng
We would prefer the 2016M as 2.0G than 1992M which seems odd, adding it to big cpu clk rate table then we can set 2016M in dts. Signed-off-by: Shunqian Zheng --- drivers/clk/rockchip/clk-rk3399.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/clk/rockchip/clk-rk3399.c b/drivers

[PATCH v5 3/8] iommu/rockchip: Fix allocation of bases array in driver probe

2016-06-23 Thread Shunqian Zheng
laves") Signed-off-by: Shunqian Zheng <zhen...@rock-chips.com> Signed-off-by: Tomasz Figa <tf...@chromium.org> Reviewed-by: Douglas Anderson <diand...@chromium.org> --- drivers/iommu/rockchip-iommu.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dr

[PATCH v5 3/8] iommu/rockchip: Fix allocation of bases array in driver probe

2016-06-23 Thread Shunqian Zheng
laves") Signed-off-by: Shunqian Zheng Signed-off-by: Tomasz Figa Reviewed-by: Douglas Anderson --- drivers/iommu/rockchip-iommu.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c index 53fa0d9..8a5b

[PATCH v5 8/8] iommu/rockchip: Enable Rockchip IOMMU on ARM64

2016-06-23 Thread Shunqian Zheng
From: Simon Xue <x...@rock-chips.com> This patch makes it possible to compile the rockchip-iommu driver on ARM64, so that it can be used with 64-bit SoCs equipped with this type of IOMMU. Signed-off-by: Simon Xue <x...@rock-chips.com> Signed-off-by: Shunqian Zheng <zhen...@rock-ch

[PATCH v5 6/8] drm/rockchip: Do not use DMA mapping API if attached to IOMMU domain

2016-06-23 Thread Shunqian Zheng
ga <tf...@chromium.org> Signed-off-by: Shunqian Zheng <zhen...@rock-chips.com> --- drivers/gpu/drm/rockchip/rockchip_drm_drv.h | 3 + drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 221 ++-- drivers/gpu/drm/rockchip/rockchip_drm_gem.h | 9 ++ 3 files changed, 222

[PATCH v5 8/8] iommu/rockchip: Enable Rockchip IOMMU on ARM64

2016-06-23 Thread Shunqian Zheng
From: Simon Xue This patch makes it possible to compile the rockchip-iommu driver on ARM64, so that it can be used with 64-bit SoCs equipped with this type of IOMMU. Signed-off-by: Simon Xue Signed-off-by: Shunqian Zheng Signed-off-by: Tomasz Figa --- drivers/iommu/Kconfig | 2 +- 1 file

[PATCH v5 6/8] drm/rockchip: Do not use DMA mapping API if attached to IOMMU domain

2016-06-23 Thread Shunqian Zheng
. This patch should not introduce any functional changes until the driver is made to attach subdevices into an IOMMU domain with the generic IOMMU API, which will happen in following patch. Based heavily on GEM implementation of Tegra DRM driver. Signed-off-by: Tomasz Figa Signed-off-by: Shunqian

[PATCH v5 4/8] iommu/rockchip: Use DMA API to manage coherency

2016-06-23 Thread Shunqian Zheng
device is registered for each allocated IOMMU domain. With this patch, this driver can be used on both ARM and ARM64 platforms, such as RK3288 and RK3399 respectively. Signed-off-by: Shunqian Zheng <zhen...@rock-chips.com> Signed-off-by: Tomasz Figa <tf...@chromium.org> --- drivers/io

[PATCH v5 4/8] iommu/rockchip: Use DMA API to manage coherency

2016-06-23 Thread Shunqian Zheng
device is registered for each allocated IOMMU domain. With this patch, this driver can be used on both ARM and ARM64 platforms, such as RK3288 and RK3399 respectively. Signed-off-by: Shunqian Zheng Signed-off-by: Tomasz Figa --- drivers/iommu/rockchip-iommu.c | 162

[PATCH v5 7/8] drm/rockchip: Use common IOMMU API to attach devices

2016-06-23 Thread Shunqian Zheng
wires things to use the new method. Signed-off-by: Shunqian Zheng <zhen...@rock-chips.com> Signed-off-by: Tomasz Figa <tf...@chromium.org> --- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 100 +++- 1 file changed, 53 insertions(+), 47 deletions(-) diff --git a

[PATCH v5 2/8] iommu/rockchip: Add map_sg callback for rk_iommu_ops

2016-06-23 Thread Shunqian Zheng
From: Simon Xue <x...@rock-chips.com> The iommu_dma_alloc() in iommu/dma-iommu.c calls iommu_map_sg() that requires the callback iommu_ops .map_sg(). Adding the default_iommu_map_sg() to Rockchip IOMMU accordingly. Signed-off-by: Simon Xue <x...@rock-chips.com> Signed-off-by: Shunq

[PATCH v5 5/8] iommu/rockchip: Prepare to support generic DMA mapping

2016-06-23 Thread Shunqian Zheng
Set geometry for allocated domains and fix .domain_alloc() callback to work with IOMMU_DOMAIN_DMA domain type, which is used for implicit domains on ARM64. Signed-off-by: Shunqian Zheng <zhen...@rock-chips.com> Signed-off-by: Tomasz Figa <tf...@chromium.org> --- drivers/iommu/rock

[PATCH v5 7/8] drm/rockchip: Use common IOMMU API to attach devices

2016-06-23 Thread Shunqian Zheng
wires things to use the new method. Signed-off-by: Shunqian Zheng Signed-off-by: Tomasz Figa --- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 100 +++- 1 file changed, 53 insertions(+), 47 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers

[PATCH v5 2/8] iommu/rockchip: Add map_sg callback for rk_iommu_ops

2016-06-23 Thread Shunqian Zheng
From: Simon Xue The iommu_dma_alloc() in iommu/dma-iommu.c calls iommu_map_sg() that requires the callback iommu_ops .map_sg(). Adding the default_iommu_map_sg() to Rockchip IOMMU accordingly. Signed-off-by: Simon Xue Signed-off-by: Shunqian Zheng Reviewed-by: Douglas Anderson Signed-off

[PATCH v5 5/8] iommu/rockchip: Prepare to support generic DMA mapping

2016-06-23 Thread Shunqian Zheng
Set geometry for allocated domains and fix .domain_alloc() callback to work with IOMMU_DOMAIN_DMA domain type, which is used for implicit domains on ARM64. Signed-off-by: Shunqian Zheng Signed-off-by: Tomasz Figa --- drivers/iommu/rockchip-iommu.c | 16 +++- 1 file changed, 11

iommu/rockchip: Fix bugs and enable on ARM64

2016-06-23 Thread Shunqian Zheng
: - Instead of registering virtual IOMMU from DTS, create it when attaching. - Fix some bugs found in internal review. Shunqian Zheng (4): iommu/rockchip: Fix allocation of bases array in driver probe iommu/rockchip: Use DMA API to manage coherency iommu/rockchip: Prepare to support generic DMA

iommu/rockchip: Fix bugs and enable on ARM64

2016-06-23 Thread Shunqian Zheng
: - Instead of registering virtual IOMMU from DTS, create it when attaching. - Fix some bugs found in internal review. Shunqian Zheng (4): iommu/rockchip: Fix allocation of bases array in driver probe iommu/rockchip: Use DMA API to manage coherency iommu/rockchip: Prepare to support generic DMA

[PATCH v5 1/8] iommu/rockchip: Fix devm_{request,free}_irq parameter

2016-06-23 Thread Shunqian Zheng
clear. Signed-off-by: Simon Xue <x...@rock-chips.com> Signed-off-by: Shunqian Zheng <zhen...@rock-chips.com> Reviewed-by: Douglas Anderson <diand...@chromium.org> Signed-off-by: Tomasz Figa <tf...@chromium.org> --- drivers/iommu/rockchip-iommu.c | 4 ++-- 1 file changed

[PATCH v5 1/8] iommu/rockchip: Fix devm_{request,free}_irq parameter

2016-06-23 Thread Shunqian Zheng
-by: Simon Xue Signed-off-by: Shunqian Zheng Reviewed-by: Douglas Anderson Signed-off-by: Tomasz Figa --- drivers/iommu/rockchip-iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c index 25b4627..5a9659a 100644

[PATCH v3 3/6] iommu/rockchip: support virtual iommu slave device

2016-06-15 Thread Shunqian Zheng
a iommu when virtual master(group is NULL) attaching, so it can use this iommu even the real iommus disabled. Changes of V3: - Instead of registering virtual iommu in DTS, this patch creates a iommu when attaching. Signed-off-by: Shunqian Zheng <zhen...@rock-chips.com> Suggested-by: Tomas

[PATCH v3 5/6] iommu/rockchip: use DMA API to map, to flush cache

2016-06-15 Thread Shunqian Zheng
led. With this patch, this driver is available for ARM64 like RK3399. Signed-off-by: Shunqian Zheng <zhen...@rock-chips.com> --- drivers/iommu/rockchip-iommu.c | 113 +++-- 1 file changed, 76 insertions(+), 37 deletions(-) diff --git a/drivers/iommu/rockchip-

[PATCH v3 3/6] iommu/rockchip: support virtual iommu slave device

2016-06-15 Thread Shunqian Zheng
a iommu when virtual master(group is NULL) attaching, so it can use this iommu even the real iommus disabled. Changes of V3: - Instead of registering virtual iommu in DTS, this patch creates a iommu when attaching. Signed-off-by: Shunqian Zheng Suggested-by: Tomasz Figa --- drivers/iommu

[PATCH v3 5/6] iommu/rockchip: use DMA API to map, to flush cache

2016-06-15 Thread Shunqian Zheng
led. With this patch, this driver is available for ARM64 like RK3399. Signed-off-by: Shunqian Zheng --- drivers/iommu/rockchip-iommu.c | 113 +++-- 1 file changed, 76 insertions(+), 37 deletions(-) diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockc

[PATCH v3 1/6] iommu/rockchip: fix devm_{request,free}_irq parameter

2016-06-15 Thread Shunqian Zheng
From: Simon Xue <x...@rock-chips.com> Even though the iommu shares irq with its master, using the *dev of iommu instead of master's *dev for devm_{request,free}_irq makes things clear. Signed-off-by: Simon Xue <x...@rock-chips.com> Signed-off-by: Shunqian Zheng <zhen...@rock-chip

[PATCH v3 1/6] iommu/rockchip: fix devm_{request,free}_irq parameter

2016-06-15 Thread Shunqian Zheng
From: Simon Xue Even though the iommu shares irq with its master, using the *dev of iommu instead of master's *dev for devm_{request,free}_irq makes things clear. Signed-off-by: Simon Xue Signed-off-by: Shunqian Zheng Reviewed-by: Tomasz Figa --- drivers/iommu/rockchip-iommu.c | 4 ++-- 1

[PATCH v3 2/6] iommu/rockchip: add map_sg callback for rk_iommu_ops

2016-06-15 Thread Shunqian Zheng
From: Simon Xue <x...@rock-chips.com> The iommu_dma_alloc() in iommu/dma-iommu.c calls iommu_map_sg() that requires the callback iommu_ops .map_sg(). Adding the default_iommu_map_sg() to rockchip iommu accordingly. Signed-off-by: Simon Xue <x...@rock-chips.com> Signed-off-by: Shunq

[PATCH v3 6/6] iommu/rockchip: enable rockchip iommu on ARM64 platform

2016-06-15 Thread Shunqian Zheng
From: Simon Xue <x...@rock-chips.com> This patch makes it possible to compile the rockchip-iommu driver on ARM64 platform to be used with 64-bit SoCs equipped with this type of IOMMU. Signed-off-by: Simon Xue <x...@rock-chips.com> Signed-off-by: Shunqian Zheng <zhen...@rock-chip

[PATCH v3 4/6] drm: rockchip: use common iommu api to attach iommu

2016-06-15 Thread Shunqian Zheng
-by: Shunqian Zheng <zhen...@rock-chips.com> --- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 112 +--- drivers/gpu/drm/rockchip/rockchip_drm_drv.h | 1 + 2 files changed, 71 insertions(+), 42 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_dr

[PATCH v3 0/6] fix bugs; enable iommu for ARM64

2016-06-15 Thread Shunqian Zheng
of registering virtual iommu in DTS, V3 creates a iommu when attaching. - Fix some bugs according to Tomasz's comments, most of them are offline, locally. Shunqian Zheng (3): iommu/rockchip: support virtual iommu slave device drm: rockchip: use common iommu api to attach iommu

[PATCH v3 2/6] iommu/rockchip: add map_sg callback for rk_iommu_ops

2016-06-15 Thread Shunqian Zheng
From: Simon Xue The iommu_dma_alloc() in iommu/dma-iommu.c calls iommu_map_sg() that requires the callback iommu_ops .map_sg(). Adding the default_iommu_map_sg() to rockchip iommu accordingly. Signed-off-by: Simon Xue Signed-off-by: Shunqian Zheng Reviewed-by: Tomasz Figa --- drivers/iommu

[PATCH v3 6/6] iommu/rockchip: enable rockchip iommu on ARM64 platform

2016-06-15 Thread Shunqian Zheng
From: Simon Xue This patch makes it possible to compile the rockchip-iommu driver on ARM64 platform to be used with 64-bit SoCs equipped with this type of IOMMU. Signed-off-by: Simon Xue Signed-off-by: Shunqian Zheng Reviewed-by: Tomasz Figa --- drivers/iommu/Kconfig | 2 +- 1 file changed

[PATCH v3 4/6] drm: rockchip: use common iommu api to attach iommu

2016-06-15 Thread Shunqian Zheng
-by: Shunqian Zheng --- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 112 +--- drivers/gpu/drm/rockchip/rockchip_drm_drv.h | 1 + 2 files changed, 71 insertions(+), 42 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip

[PATCH v3 0/6] fix bugs; enable iommu for ARM64

2016-06-15 Thread Shunqian Zheng
of registering virtual iommu in DTS, V3 creates a iommu when attaching. - Fix some bugs according to Tomasz's comments, most of them are offline, locally. Shunqian Zheng (3): iommu/rockchip: support virtual iommu slave device drm: rockchip: use common iommu api to attach iommu

[PATCH v2 5/7] drm: rockchip: use common iommu api to attach iommu

2016-06-08 Thread Shunqian Zheng
-by: Shunqian Zheng <zhen...@rock-chips.com> --- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 130 +++- drivers/gpu/drm/rockchip/rockchip_drm_drv.h | 1 + 2 files changed, 89 insertions(+), 42 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_dr

[PATCH v2 5/7] drm: rockchip: use common iommu api to attach iommu

2016-06-08 Thread Shunqian Zheng
-by: Shunqian Zheng --- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 130 +++- drivers/gpu/drm/rockchip/rockchip_drm_drv.h | 1 + 2 files changed, 89 insertions(+), 42 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip

[PATCH v2 4/7] ARM: dts: rockchip: add virtual iommu for display

2016-06-08 Thread Shunqian Zheng
An virtual iommu without reg or interrupts for display. Adding this according to iommu driver changes. Signed-off-by: Shunqian Zheng <zhen...@rock-chips.com> --- arch/arm/boot/dts/rk3288.dtsi | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/ar

[PATCH v2 4/7] ARM: dts: rockchip: add virtual iommu for display

2016-06-08 Thread Shunqian Zheng
An virtual iommu without reg or interrupts for display. Adding this according to iommu driver changes. Signed-off-by: Shunqian Zheng --- arch/arm/boot/dts/rk3288.dtsi | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi index

[PATCH v2 7/7] iommu/rockchip: enable rockchip iommu on ARM64 platform

2016-06-08 Thread Shunqian Zheng
From: Simon Xue <x...@rock-chips.com> Signed-off-by: Simon Xue <x...@rock-chips.com> Signed-off-by: Shunqian Zheng <zhen...@rock-chips.com> --- drivers/iommu/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kco

[PATCH v2 2/7] iommu/rockchip: add map_sg callback for rk_iommu_ops

2016-06-08 Thread Shunqian Zheng
From: Simon Xue <x...@rock-chips.com> The iommu_dma_alloc() in iommu/dma-iommu.c calls iommu_map_sg() that requires the callback iommu_ops .map_sg(). Adding the default_iommu_map_sg() to rockchip iommu accordingly. Signed-off-by: Simon Xue <x...@rock-chips.com> Signed-off-by: Shunq

[PATCH v2 3/7] iommu/rockchip: support virtual iommu slave device

2016-06-08 Thread Shunqian Zheng
, we can probe a virtual iommu device and allow the DRM attaching to it. The virtual iommu is needed also because we want convert to use DMA API for map/unmap, cache flush, so that DRM buffer alloc still work even VOP is disabled. Signed-off-by: Shunqian Zheng <zhen...@rock-chips.com> --- d

[PATCH v2 7/7] iommu/rockchip: enable rockchip iommu on ARM64 platform

2016-06-08 Thread Shunqian Zheng
From: Simon Xue Signed-off-by: Simon Xue Signed-off-by: Shunqian Zheng --- drivers/iommu/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig index ad08603..5572621 100644 --- a/drivers/iommu/Kconfig +++ b/drivers/iommu

[PATCH v2 2/7] iommu/rockchip: add map_sg callback for rk_iommu_ops

2016-06-08 Thread Shunqian Zheng
From: Simon Xue The iommu_dma_alloc() in iommu/dma-iommu.c calls iommu_map_sg() that requires the callback iommu_ops .map_sg(). Adding the default_iommu_map_sg() to rockchip iommu accordingly. Signed-off-by: Simon Xue Signed-off-by: Shunqian Zheng --- drivers/iommu/rockchip-iommu.c | 1 + 1

[PATCH v2 3/7] iommu/rockchip: support virtual iommu slave device

2016-06-08 Thread Shunqian Zheng
, we can probe a virtual iommu device and allow the DRM attaching to it. The virtual iommu is needed also because we want convert to use DMA API for map/unmap, cache flush, so that DRM buffer alloc still work even VOP is disabled. Signed-off-by: Shunqian Zheng --- drivers/iommu/rockchip-iommu.c

[PATCH v2 6/7] iommu/rockchip: use DMA API to map, to flush cache

2016-06-08 Thread Shunqian Zheng
led. With this patch, this driver is available for ARM64 like RK3399. Signed-off-by: Shunqian Zheng <zhen...@rock-chips.com> --- drivers/iommu/rockchip-iommu.c | 113 ++--- 1 file changed, 71 insertions(+), 42 deletions(-) diff --git a/drivers/iommu/rockchip-

[PATCH v2 6/7] iommu/rockchip: use DMA API to map, to flush cache

2016-06-08 Thread Shunqian Zheng
led. With this patch, this driver is available for ARM64 like RK3399. Signed-off-by: Shunqian Zheng --- drivers/iommu/rockchip-iommu.c | 113 ++--- 1 file changed, 71 insertions(+), 42 deletions(-) diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockc

[PATCH v2 1/7] iommu/rockchip: fix devm_{request,free}_irq parameter

2016-06-08 Thread Shunqian Zheng
From: Simon Xue <x...@rock-chips.com> Even though the iommu shares irq with its master, using the *dev of iommu instead of master's *dev for devm_{request,free}_irq makes things clear. Signed-off-by: Simon Xue <x...@rock-chips.com> Signed-off-by: Shunqian Zheng <zhen...

[PATCH v2 1/7] iommu/rockchip: fix devm_{request,free}_irq parameter

2016-06-08 Thread Shunqian Zheng
From: Simon Xue Even though the iommu shares irq with its master, using the *dev of iommu instead of master's *dev for devm_{request,free}_irq makes things clear. Signed-off-by: Simon Xue Signed-off-by: Shunqian Zheng --- drivers/iommu/rockchip-iommu.c | 4 ++-- 1 file changed, 2 insertions

[PATCH v2 0/7] fix bugs; enable iommu for ARM64

2016-06-08 Thread Shunqian Zheng
vs v1, so please forget the v1. Shunqian Zheng (4): iommu/rockchip: support virtual iommu slave device ARM: dts: rockchip: add virtual iommu for display drm: rockchip: use common iommu api to attach iommu iommu/rockchip: use DMA API to map, to flush cache Simon Xue (3): iommu/rockchip

[PATCH v2 0/7] fix bugs; enable iommu for ARM64

2016-06-08 Thread Shunqian Zheng
vs v1, so please forget the v1. Shunqian Zheng (4): iommu/rockchip: support virtual iommu slave device ARM: dts: rockchip: add virtual iommu for display drm: rockchip: use common iommu api to attach iommu iommu/rockchip: use DMA API to map, to flush cache Simon Xue (3): iommu/rockchip

Re: [PATCH 4/5] iommu/rockchip: add ARM64 cache flush operation for iommu

2016-05-23 Thread Shunqian Zheng
Catalin, Robin, On 2016年05月23日 21:35, Catalin Marinas wrote: On Mon, May 23, 2016 at 11:44:14AM +0100, Robin Murphy wrote: On 23/05/16 02:37, Shunqian Zheng wrote: From: Simon <x...@rock-chips.com> Signed-off-by: Simon <x...@rock-chips.com> --- drivers/iommu/rockchip-iommu.c

Re: [PATCH 4/5] iommu/rockchip: add ARM64 cache flush operation for iommu

2016-05-23 Thread Shunqian Zheng
Catalin, Robin, On 2016年05月23日 21:35, Catalin Marinas wrote: On Mon, May 23, 2016 at 11:44:14AM +0100, Robin Murphy wrote: On 23/05/16 02:37, Shunqian Zheng wrote: From: Simon Signed-off-by: Simon --- drivers/iommu/rockchip-iommu.c | 4 1 file changed, 4 insertions(+) diff --git

[PATCH 1/5] iommu/rockchip: fix devm_request_irq and devm_free_irq parameter

2016-05-22 Thread Shunqian Zheng
From: Simon When rk_iommu_attach_device or rk_iommu_detach_device be called, the second parameter "dev" represent the device who own the iommu, so it is not resonable using "dev" for devm_request_irq's first parameter. To avoid potential error, we must use iommu device

[PATCH 3/5] iommu/rockchip: add sanity check for virtual device

2016-05-22 Thread Shunqian Zheng
From: Simon We mark DRM as "virtual" device by checking it's group, which may no longer true with the new rockchip drm drv in https://patchwork.kernel.org/patch/8876331/. Checking the group->iommu_data for virtual device. Signed-off-by: Simon ---

[PATCH 1/5] iommu/rockchip: fix devm_request_irq and devm_free_irq parameter

2016-05-22 Thread Shunqian Zheng
From: Simon When rk_iommu_attach_device or rk_iommu_detach_device be called, the second parameter "dev" represent the device who own the iommu, so it is not resonable using "dev" for devm_request_irq's first parameter. To avoid potential error, we must use iommu device itself "iommu->dev"

[PATCH 3/5] iommu/rockchip: add sanity check for virtual device

2016-05-22 Thread Shunqian Zheng
From: Simon We mark DRM as "virtual" device by checking it's group, which may no longer true with the new rockchip drm drv in https://patchwork.kernel.org/patch/8876331/. Checking the group->iommu_data for virtual device. Signed-off-by: Simon --- drivers/iommu/rockchip-iommu.c | 7 ++- 1

[PATCH 5/5] iommu/rockchip: enable rockchip iommu on ARM64 platform

2016-05-22 Thread Shunqian Zheng
From: Simon Signed-off-by: Simon --- drivers/iommu/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig index ad08603..5572621 100644 --- a/drivers/iommu/Kconfig +++

[PATCH 5/5] iommu/rockchip: enable rockchip iommu on ARM64 platform

2016-05-22 Thread Shunqian Zheng
From: Simon Signed-off-by: Simon --- drivers/iommu/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig index ad08603..5572621 100644 --- a/drivers/iommu/Kconfig +++ b/drivers/iommu/Kconfig @@ -218,7 +218,7 @@ config

  1   2   >