devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Philippe CORNU <philippe.cornu@st.com>
To: Heiko Stuebner <heiko@sntech.de>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>
Cc: "mark.rutland@arm.com" <mark.rutland@arm.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"briannorris@chromium.org" <briannorris@chromium.org>,
	"hoegsberg@gmail.com" <hoegsberg@gmail.com>,
	Yannick FERTRE <yannick.fertre@st.com>,
	"linux-rockchip@lists.infradead.org"
	<linux-rockchip@lists.infradead.org>,
	"nickey.yang@rock-chips.com" <nickey.yang@rock-chips.com>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"thierry.reding@gmail.com" <thierry.reding@gmail.com>,
	"laurent.pinchart@ideasonboard.com"
	<laurent.pinchart@ideasonboard.com>,
	"mka@chromium.org" <mka@chromium.org>
Subject: Re: [PATCH v2 0/8] drm/rockchip: migrate to common dw-mipi-dsi bridge and dual-dsi
Date: Tue, 3 Jul 2018 12:05:41 +0000	[thread overview]
Message-ID: <814f6a57-a4f5-0661-758b-2094d24ca8b7@st.com> (raw)
In-Reply-To: <20180618102806.15650-1-heiko@sntech.de>

Hi Heiko,

and many thanks for this serie.
I tested "partly" it successfully on stm32 (single-dsi, no bind/unbind).

Many thanks,
Philippe :-)


On 06/18/2018 12:27 PM, Heiko Stuebner wrote:
> The Rockchip DSI driver was separate till now, not using the common
> bridge driver that was introduced a bit later. So this series migrates
> over to use that common bridge driver and then also adds support for
> dual-dsi to both the bridge and Rockchip glue code.
> 
> The bridge-migration itself is based on Nickeys earlier v8
> work, but adapted to current kernels and with a new split between probe
> and bind, so that we do not create and drop the dsi-host on each deferred
> bind attempt.
> 
> changes in v2:
> - rebase against newer drm code (dsi-bridge+rockchip changes)
> - add SPDX header to new glue driver
> - expect regular interface lanes from panel (like 4) not the double number
>    Similar to tegra
> - keep links to both master and slave
> 
> 
> The dual-dsi setup follows the port description introduced by Archit [0],
> in that the panel defines two input ports that get connected to both
> dsi-controllers instances. So on Gru-Scarlett this looks for example
> like:
> 
> &mipi_dsi {
> 	status = "okay";
> 	clock-master;
> 
> 	ports {
> 		mipi_out: port@1 {
> 			reg = <1>;
> 
> 			mipi_out_panel: endpoint {
> 				remote-endpoint = <&mipi_in_panel>;
> 			};
> 		};
> 	};
> 
> 	mipi_panel: panel@0 {
> 		/* 2 different panels are used, compatibles are in dts files */
> 		reg = <0>;
> 		backlight = <&backlight>;
> 		enable-gpios = <&gpio4 25 GPIO_ACTIVE_HIGH>;
> 		pinctrl-names = "default";
> 		pinctrl-0 = <&display_rst_l>;
> 
> 		ports {
> 			#address-cells = <1>;
> 			#size-cells = <0>;
> 
> 			port@0 {
> 				reg = <0>;
> 
> 				mipi_in_panel: endpoint {
> 					remote-endpoint = <&mipi_out_panel>;
> 				};
> 			};
> 
> 			port@1 {
> 				reg = <1>;
> 
> 				mipi1_in_panel: endpoint@1 {
> 					remote-endpoint = <&mipi1_out_panel>;
> 				};
> 			};
> 		};
> 	};
> };
> 
> &mipi_dsi1 {
> 	status = "okay";
> 
> 	ports {
> 		mipi1_out: port@1 {
> 			reg = <1>;
> 
> 			mipi1_out_panel: endpoint {
> 				remote-endpoint = <&mipi1_in_panel>;
> 			};
> 		};
> 	};
> };
> 
> 
> The driver internal setup is pretty similar to what tegra does with
> its ganged-mode [1][2]. But here a new helper function allows to traverse
> the devicetree from one controller port through the panel to find
> another dsi-controller using that same panel. This way we don't need
> a special phandle-property to link the controllers together.
> 
> For the CRTC it is still one single display to handle, only with
> an additional switch that enables the dual-dsi output.
> 
> 
> For practical purposes it is possible to just pick half the series
> (till patch 5) to get the migration to the bridge driver first,
> so that we can get rid of the dw-dsi copy in the Rockchip driver.
> 
> But of course Acks / Reviews of the dsi-bridge changes would be needed.
> 
> 
> [0] https://patchwork.kernel.org/patch/10172381/
> [1] https://lkml.org/lkml/2014/8/5/396
> [2] https://patchwork.kernel.org/patch/5075161/
> 
> Heiko Stuebner (5):
>    drm/bridge/synopsys: dsi: move mipi_dsi_host_unregister to
>      __dw_mipi_dsi_remove
>    drm/bridge/synopsys: dsi: don't call __dw_mipi_dsi_probe from
>      dw_mipi_dsi_bind
>    drm/bridge/synopsys: dsi: defer probing if panel not available in
>      bridge-attach
>    drm/dsi: add helper function to find the second host in a dual-dsi
>      setup
>    drm/rockchip: dsi: add dual mipi support
> 
> Nickey Yang (3):
>    dt-bindings: display: rockchip: update DSI controller
>    drm/rockchip: dsi: migrate to use dw-mipi-dsi bridge driver
>    drm/bridge/synopsys: dsi: add dual-dsi support
> 
>   .../display/rockchip/dw_mipi_dsi_rockchip.txt |   23 +-
>   drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c |  115 +-
>   drivers/gpu/drm/drm_mipi_dsi.c                |   56 +
>   drivers/gpu/drm/rockchip/Kconfig              |    2 +-
>   drivers/gpu/drm/rockchip/Makefile             |    2 +-
>   .../gpu/drm/rockchip/dw-mipi-dsi-rockchip.c   |  992 ++++++++++++
>   drivers/gpu/drm/rockchip/dw-mipi-dsi.c        | 1349 -----------------
>   drivers/gpu/drm/rockchip/rockchip_drm_drv.c   |    2 +-
>   drivers/gpu/drm/rockchip/rockchip_drm_drv.h   |    3 +-
>   drivers/gpu/drm/rockchip/rockchip_drm_vop.c   |    3 +
>   drivers/gpu/drm/rockchip/rockchip_drm_vop.h   |    4 +
>   drivers/gpu/drm/rockchip/rockchip_vop_reg.c   |    1 +
>   include/drm/bridge/dw_mipi_dsi.h              |    6 +-
>   include/drm/drm_mipi_dsi.h                    |    2 +
>   14 files changed, 1179 insertions(+), 1381 deletions(-)
>   create mode 100644 drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
>   delete mode 100644 drivers/gpu/drm/rockchip/dw-mipi-dsi.c
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

      parent reply	other threads:[~2018-07-03 12:05 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-18 10:27 [PATCH v2 0/8] drm/rockchip: migrate to common dw-mipi-dsi bridge and dual-dsi Heiko Stuebner
2018-06-18 10:27 ` [PATCH v2 1/8] drm/bridge/synopsys: dsi: move mipi_dsi_host_unregister to __dw_mipi_dsi_remove Heiko Stuebner
2018-07-03 10:40   ` Andrzej Hajda
2018-07-03 11:58   ` Philippe CORNU
2018-06-18 10:28 ` [PATCH v2 2/8] drm/bridge/synopsys: dsi: don't call __dw_mipi_dsi_probe from dw_mipi_dsi_bind Heiko Stuebner
2018-07-03 12:16   ` Andrzej Hajda
2018-07-03 12:32     ` Heiko Stübner
2018-07-04 12:23     ` Heiko Stuebner
2018-06-18 10:28 ` [PATCH v2 3/8] drm/bridge/synopsys: dsi: defer probing if panel not available in bridge-attach Heiko Stuebner
2018-07-03 11:57   ` Philippe CORNU
2018-07-03 12:42   ` Andrzej Hajda
2018-07-04 10:36     ` Heiko Stuebner
2018-06-18 10:28 ` [PATCH v2 4/8] dt-bindings: display: rockchip: update DSI controller Heiko Stuebner
2018-06-18 10:30   ` Heiko Stuebner
2018-06-18 10:28 ` [PATCH v2 5/8] drm/rockchip: dsi: migrate to use dw-mipi-dsi bridge driver Heiko Stuebner
2018-07-03 13:06   ` Andrzej Hajda
2018-06-18 10:28 ` [PATCH v2 6/8] drm/dsi: add helper function to find the second host in a dual-dsi setup Heiko Stuebner
2018-07-03 15:06   ` Andrzej Hajda
2018-07-04 10:47     ` Heiko Stuebner
2018-06-18 10:28 ` [PATCH v2 7/8] drm/bridge/synopsys: dsi: add dual-dsi support Heiko Stuebner
2018-07-03 11:57   ` Philippe CORNU
2018-07-03 17:07   ` Andrzej Hajda
2018-07-09 13:45     ` Heiko Stuebner
2018-07-09 16:02       ` Andrzej Hajda
2018-06-18 10:28 ` [PATCH v2 8/8] drm/rockchip: dsi: add dual mipi support Heiko Stuebner
2018-07-03 12:05 ` Philippe CORNU [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=814f6a57-a4f5-0661-758b-2094d24ca8b7@st.com \
    --to=philippe.cornu@st.com \
    --cc=briannorris@chromium.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=heiko@sntech.de \
    --cc=hoegsberg@gmail.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=mka@chromium.org \
    --cc=nickey.yang@rock-chips.com \
    --cc=robh+dt@kernel.org \
    --cc=thierry.reding@gmail.com \
    --cc=yannick.fertre@st.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).