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 changes in v3: - don't defer in bridge_attach, instead add ability to check for finalized panel attachement, for example in bind - address bridge-conversion comments from Andrzej: - include ordering - moved hwaccess from mode_set to enable callback - move pllref_clk enablement to bind (needed by bridge mode_set->lane_mbps) - limited slave settings to dw_mipi_dsi_set_slave - address dual-dsi comments from Philippe: - remove unneeded separate variables - remove unneeded second slave settings - disable slave before master - lane-sum calculation comments Unchanged from review comments: - kept dw_mipi_dsi_bind, as the dsi->bridge member is only part of the bridge drivers struct, so not accessible from glue drivers - kept panel deferral in rk-bind, as the dsi bus containing the panel will only be created during probe, so this gives the system a chance to probe the panel between probe and bind calls, saving around 2 deferral rounds on my Gru-Scarlet - when compared to always deferring during probe. (panel module-load time + async probing) + of course saving time not re-creating the dsi bus on each probe try - kept helper to find second host, as I think it's pretty near to Archit's description - kept dual-dsi handling that mimicks tegra for now Cover-letter blurb from v2: --------------------------- 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: add ability to check dsi-device attachment 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 | 124 +- 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 | 1005 ++++++++++++ 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 | 7 +- include/drm/drm_mipi_dsi.h | 2 + 14 files changed, 1204 insertions(+), 1379 deletions(-) create mode 100644 drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c delete mode 100644 drivers/gpu/drm/rockchip/dw-mipi-dsi.c -- 2.17.0 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html