From patchwork Tue Dec 3 14:15:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris Brezillon X-Patchwork-Id: 11271375 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B5B13159A for ; Tue, 3 Dec 2019 14:15:33 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9EC872084B for ; Tue, 3 Dec 2019 14:15:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9EC872084B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=collabora.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 02A626E5E1; Tue, 3 Dec 2019 14:15:27 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by gabe.freedesktop.org (Postfix) with ESMTPS id E1FD86E5DB for ; Tue, 3 Dec 2019 14:15:24 +0000 (UTC) Received: from localhost.localdomain (unknown [IPv6:2a01:e0a:2c:6930:5cf4:84a1:2763:fe0d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: bbrezillon) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id D199C27FB0C; Tue, 3 Dec 2019 14:15:22 +0000 (GMT) From: Boris Brezillon To: dri-devel@lists.freedesktop.org Subject: [PATCH v4 00/11] drm: Add support for bus-format negotiation Date: Tue, 3 Dec 2019 15:15:04 +0100 Message-Id: <20191203141515.3597631-1-boris.brezillon@collabora.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.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 , Neil Armstrong , Thierry Reding , Laurent Pinchart , kernel@collabora.com, Sam Ravnborg , Nikita Yushchenko , Andrey Smirnov , Kyungmin Park , Chris Healy , devicetree@vger.kernel.org, Jonas Karlman , Rob Herring , Jernej Skrabec , Seung-Woo Kim , Boris Brezillon Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This patch series aims at adding support for runtime bus-format negotiation between all elements of the 'encoder -> bridges -> connector/display' section of the pipeline. In order to support that, we need drm bridges to fully take part in the atomic state validation process, which requires adding a drm_bridge_state and a new drm_bridge_funcs.atomic_check() hook. Once those basic building blocks are in place, we can add new hooks to allow bus format negotiation (those are called just before ->atomic_check()). The bus format selection is done at runtime by testing all possible combinations across the whole bridge chain until one is reported to work. No Major changes in this v4. I think I addressed all comments I got from Neil and Laurent (thanks for the detailed reviews BTW). Note that this version only contains core changes. Once those changes are merged I'll send the imx/panel/lvds-codec specific bits. A more detailed changelog is provided in each patch. This patch series is also available here [1]. Thanks, Boris [1]https://github.com/bbrezillon/linux-0day/commits/drm-bridge-busfmt-v4 Boris Brezillon (11): drm/bridge: Rename bridge helpers targeting a bridge chain drm/bridge: Introduce drm_bridge_get_next_bridge() drm: Stop accessing encoder->bridge directly drm/bridge: Make the bridge chain a double-linked list drm/bridge: Add the drm_for_each_bridge_in_chain() helper drm/bridge: Add the drm_bridge_get_prev_bridge() helper drm/bridge: Clarify the atomic enable/disable hooks semantics drm/bridge: Add a drm_bridge_state object drm/bridge: Patch atomic hooks to take a drm_bridge_state drm/bridge: Add an ->atomic_check() hook drm/bridge: Add the necessary bits to support bus format negotiation .../drm/bridge/analogix/analogix_dp_core.c | 41 +- drivers/gpu/drm/drm_atomic.c | 39 + drivers/gpu/drm/drm_atomic_helper.c | 53 +- drivers/gpu/drm/drm_bridge.c | 756 +++++++++++++++--- drivers/gpu/drm/drm_encoder.c | 15 +- drivers/gpu/drm/drm_probe_helper.c | 4 +- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 13 +- drivers/gpu/drm/mediatek/mtk_hdmi.c | 8 +- drivers/gpu/drm/msm/edp/edp_bridge.c | 10 +- drivers/gpu/drm/omapdrm/omap_drv.c | 4 +- drivers/gpu/drm/omapdrm/omap_encoder.c | 3 +- drivers/gpu/drm/rcar-du/rcar_du_crtc.c | 10 +- drivers/gpu/drm/vc4/vc4_dsi.c | 18 +- include/drm/drm_atomic.h | 3 + include/drm/drm_bridge.h | 404 +++++++++- include/drm/drm_encoder.h | 7 +- 16 files changed, 1174 insertions(+), 214 deletions(-)