From patchwork Tue Aug 14 10:26:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Stuebner X-Patchwork-Id: 10565257 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3969E13B4 for ; Tue, 14 Aug 2018 10:27:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 26D4528EA5 for ; Tue, 14 Aug 2018 10:27:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1A479298B0; Tue, 14 Aug 2018 10:27:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A460F28EA5 for ; Tue, 14 Aug 2018 10:27:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 03C2C6E066; Tue, 14 Aug 2018 10:27:07 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) by gabe.freedesktop.org (Postfix) with ESMTPS id 41DB66E066 for ; Tue, 14 Aug 2018 10:27:05 +0000 (UTC) Received: from wd0180.dip.tu-dresden.de ([141.76.108.180] helo=phil.dip.tu-dresden.de) by gloria.sntech.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.89) (envelope-from ) id 1fpWXT-0006yF-Az; Tue, 14 Aug 2018 12:26:59 +0200 From: Heiko Stuebner To: dri-devel@lists.freedesktop.org Subject: [PATCH v4 0/8] drm/rockchip: migrate to common dw-mipi-dsi bridge and dual-dsi Date: Tue, 14 Aug 2018 12:26:46 +0200 Message-Id: <20180814102654.29113-1-heiko@sntech.de> X-Mailer: git-send-email 2.17.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, briannorris@chromium.org, hoegsberg@gmail.com, philippe.cornu@st.com, yannick.fertre@st.com, linux-rockchip@lists.infradead.org, nickey.yang@rock-chips.com, robh+dt@kernel.org, thierry.reding@gmail.com, laurent.pinchart@ideasonboard.com, mka@chromium.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP 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 changes in v4: - rebase against some legacy rockchip-dsi changes - add dsi-component only after panel has attached to dsi host This solves quite some concurrency problems that happen when trying to determine dsi-panel availability 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 helper to find second host, as I think it's pretty near to Archit's description - kept dual-dsi handling that mimicks tegra 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 have glue-specific attach and detach 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 | 114 +- 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 | 1032 +++++++++++++ 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 | 14 +- include/drm/drm_mipi_dsi.h | 2 + 14 files changed, 1228 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