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: 10565267 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 83FFC1815 for ; Tue, 14 Aug 2018 10:27:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 70133298BC for ; Tue, 14 Aug 2018 10:27:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 63884298CE; Tue, 14 Aug 2018 10:27:29 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E8547298C2 for ; Tue, 14 Aug 2018 10:27:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=/FizhSN3cGEGo7BOyPs88hpFq7QDcDouXXMbz5Oqv+A=; b=IPN ll+gcfuEW4SOtdcrm82hmYAdZT+lB7hjQZUaOvz7CucEzyKfRROroMd2+dzgvsNYnZUOmCK/8b46y 9Ycnl3MLokwqQ9fML3T1nm0x4gBmRYKmhcCtZSBoW6WnqX/lqr5v4vF1Zqi5tsLGKKS9x0bI51fnQ +CNtiwcq80pGpRrlDB7OpOqgkIR1o/5YVnUSHe5guMExL4VKHO3gUwA0VYm3W1F4pP6pb4i8Xm1ur Tk6FakA2yPhJD8OhGaei1oxUUucnJyLQc2mZgtEy0LIMAM/ly03rkxuLZzNW8r6sPSjYdJovzFXk3 oKVnZyo1FICL2S/YYTaOtW0fSsnMV+A==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fpWXt-0000Vn-5c; Tue, 14 Aug 2018 10:27:25 +0000 Received: from gloria.sntech.de ([185.11.138.130]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fpWXq-0000Rv-5Y for linux-rockchip@lists.infradead.org; Tue, 14 Aug 2018 10:27:24 +0000 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180814_032722_395361_C6E86787 X-CRM114-Status: GOOD ( 12.97 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, architt@codeaurora.org, Heiko Stuebner , a.hajda@samsung.com, 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, seanpaul@chromium.org, mka@chromium.org MIME-Version: 1.0 Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org 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