From patchwork Tue Mar 28 17:07:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 2824 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 9BC254147B for ; Tue, 28 Mar 2023 19:08:21 +0200 (CEST) Received: by mail-pf1-f200.google.com with SMTP id x68-20020a628647000000b0062624c52117sf6120760pfd.14 for ; Tue, 28 Mar 2023 10:08:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1680023300; cv=pass; d=google.com; s=arc-20160816; b=VpjvWyJzd8SHwPypARWVOC3RbFeAoRFzAeEGV+bWisIa4Cmp6Dapco1GkMRh6BDR10 HC6mt9inHtuQJX/OXDHnGE2CcOPgqZ2tYP1jFwrIV8AWwGmA02fjFHiOnxyQNEjUD4h8 rXlViVS6NBK9VP/fQK/B6X30j+endOkx0bCjgYrfA3ustz2cM9JBEGgj3qLXoYTnZHyV WyBp+qXMpPS9GUU35Y+IWlPhm6DlnXMtgVLuLJwRmcjv/m+AvDAW/x4wfke+BHK3WXnL +6CQZqEZN/Ldf9UoIGfz5cO98KEdNnildw0lqRXgllYRniACwA6edMSQEr73zN/SnktW Q+GA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=fQrZYJLcosxEaU28538TFgxab8DttZywoE8TT07kOFE=; b=kfqGZXC7LdzGb1su/Xiwy/E/x/XNnZh4PBkpk3nD+AG5j+H3kC3oVfovGtxc7GP0yE exuRx+pcynaHq4v8Oc2sW4sTE4WXGn5rUSUyb5Msy5zHE9Q1iG/EuQQPcOZxIkfHWXGt bFQ6F7n2CWkl5jNhM5OsJ4FJpAmfY5othLyhXs3u4q9ahH3y3j6bOlbrnHuYSG/ihBCz hsk+5qxNTK8vv6JaYhb7caj7TYrhlt89QvneLQM0BJMqBh3OKfqBNkivAbz+E7GyhKmK B5dFYwHYlOM5E5QEtdZJg2pWVYWB4+mIbiLPurx1GriKiiG1Vg4MArmRxVfprlz/GT9U +H1A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=h9ybu4KV; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1680023300; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=fQrZYJLcosxEaU28538TFgxab8DttZywoE8TT07kOFE=; b=H2eNpJPXofLulPR0fFmo6VBUk8G6oHdd4XcQ4LtQ2aDf5hyAcuDlqliv8ByUPZ6SZJ GEtpaW+Ndmq5wDiotNURepCozjVENpOMPo8bwQT0EPUQqebjMLamGlSqmQ9EYu1PGTcH GiLDDh79NMnVxZ/WWviLELAweQrjvBc2sOAdM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680023300; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fQrZYJLcosxEaU28538TFgxab8DttZywoE8TT07kOFE=; b=ZP/fwWdxcX6jmOi6GWwXLkaamb3j5N5KBaXm2lUPuJkn5PIGw0QOpyXVKcgsaxusAD Dx18I1xHwIhsY4TTBTmFIaMoHn8U7qodIMvGZ5XBIiO6jIMeeEz6VBnXvf8+bqoscxaO fbDQ1lRmopf/Slvjva7GeXRqTBEdAei7Kjgpmg+2Esf+bURzNQVlrfFxtuNj+v0VFgrv Ki6FoqaJfwTCZ5eC68vzYp2UaEErl+dlJ4QL9ju/rdN3ajq+dz5FvZopMtJ58a0xtAEB UMOc6EvwqcD0KN0O2lCKV6OdxygWB5P74mNfv6JodTlsf9O/C6iD3yj0hBlSDWYx6zEC uWIg== X-Gm-Message-State: AAQBX9fB30tV5kgC5pQjJ/vmzezMUZvlQPI4GkvEyCISJEbCSJJ/x7xz m6GZtnQ+oZDLn0g8YeCbrIYdtqTpXs9uWQHf X-Google-Smtp-Source: AKy350YthT3wLToSBVV7szyBtyYfy+Sty0+8SroBejEIW7UZyXyuUmgtmjWiNTj0vopjz3nVLUTUog== X-Received: by 2002:a17:90b:113:b0:23b:32c0:7cc8 with SMTP id p19-20020a17090b011300b0023b32c07cc8mr4934334pjz.7.1680023300178; Tue, 28 Mar 2023 10:08:20 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:62c3:b0:236:6df7:76b0 with SMTP id k3-20020a17090a62c300b002366df776b0ls11125235pjs.2.-pod-canary-gmail; Tue, 28 Mar 2023 10:08:19 -0700 (PDT) X-Received: by 2002:a17:902:f551:b0:1a0:616d:7618 with SMTP id h17-20020a170902f55100b001a0616d7618mr15974501plf.51.1680023299237; Tue, 28 Mar 2023 10:08:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680023299; cv=none; d=google.com; s=arc-20160816; b=wDOFSI5Boigskbe3YAPyQfFzs4U940gm74qmGz0Lo393R44hfQ9+pEw5yuLQ188vVt Hcoq8jCw/1JLQBD4xNPN+zm6fyhvJ/5uiY4rCSAt6Ga56enYQU//OdMZzP89rgyAxSEm a8OM24Cu0O7yJBE0VUro8jMbC1icGJx/1DgXi6P7q8SElDUBZpCjrADXJPty2qfbA9ZD W9MPay2vFflkeRZcYZIeBaO4bcHPQsOc1QYnX4zWBtKsZ5e5KwwdZ6vQkIr1NApfMqfd u21vhMlkcDph1Q6hJGxZxpPWw9+/Ztpe+CkN9ymiJjbzHjZi/dpfJLjKilJfvOCjpSF+ PEIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=qiCO4IDfxsC8fotKJWg3fnLWcorJmHZQyMnMP9mcruw=; b=q5k4HyKu9ft9q+dbFuoiA4xu647ocy/hUImuUMWrrwlnURisyOITdhjS004LFOGfK9 mrkErdXTAu4MBzK1Z9f9i2Ufql2b+Qcj+vOGjAJle/+JGDaDAodkOEqJbTeFtl93ppuE 2kK2yXgjVlKsDD3v99cr2feBMi4uOYiRA4A2oCJ1u5e5Kb9k9ot0mbZLzWgvZY7nCiVg UqMS5Xc6m2gAAfAI0pqwFpyR83ekg522mUwdRHMQ3qJ98/kMIx7zO+OgN6osM2lDzL8g hsKuRh3J1Mns6b8RWinfDV8+NGqX27mdKGxWh7z+FyCvzYy7WkrchXS62t5OwOvmUOne dSlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=h9ybu4KV; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id y16-20020a17090322d000b0019c35405636sor12146944plg.178.2023.03.28.10.08.19 for (Google Transport Security); Tue, 28 Mar 2023 10:08:19 -0700 (PDT) Received-SPF: pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a17:902:d506:b0:1a1:b172:5428 with SMTP id b6-20020a170902d50600b001a1b1725428mr20545489plg.18.1680023298915; Tue, 28 Mar 2023 10:08:18 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c00a:a047:2fbc:aff5:d52a:cc2c]) by smtp.gmail.com with ESMTPSA id y17-20020a170902b49100b0019f114570b0sm20470349plr.152.2023.03.28.10.08.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Mar 2023 10:08:18 -0700 (PDT) From: Jagan Teki To: Dave Stevenson , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Andrzej Hajda , Neil Armstrong Cc: dri-devel@lists.freedesktop.org, Marek Vasut , linux-amarula , Jagan Teki Subject: [PATCH v2 2/2] drm/bridge: Document bridge init order with pre_enable_prev_first Date: Tue, 28 Mar 2023 22:37:52 +0530 Message-Id: <20230328170752.1102347-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230328170752.1102347-1-jagan@amarulasolutions.com> References: <20230328170752.1102347-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=h9ybu4KV; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , In order to satisfy the MIPI DSI initialization sequence the bridge init order has been altered with the help of pre_enable_prev_first in pre_enable and post_disable bridge operations. Document the affected bridge init order with an example on the bridge operations helpers. Signed-off-by: Jagan Teki Reviewed-by: Dave Stevenson --- Changes for v2: - add missing dri-devel in CC - prefix @ for bridge helper names drivers/gpu/drm/drm_bridge.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c index 052a8e6c9961..caf0f341e524 100644 --- a/drivers/gpu/drm/drm_bridge.c +++ b/drivers/gpu/drm/drm_bridge.c @@ -654,6 +654,13 @@ static void drm_atomic_bridge_call_post_disable(struct drm_bridge *bridge, * bridge will be called before the previous one to reverse the @pre_enable * calling direction. * + * Example: + * Bridge A ---> Bridge B ---> Bridge C ---> Bridge D ---> Bridge E + * + * With pre_enable_prev_first flag enable in Bridge B, D, E then the resulting + * @post_disable order would be, + * Bridge B, Bridge A, Bridge E, Bridge D, Bridge C. + * * Note: the bridge passed should be the one closest to the encoder */ void drm_atomic_bridge_chain_post_disable(struct drm_bridge *bridge, @@ -750,6 +757,13 @@ static void drm_atomic_bridge_call_pre_enable(struct drm_bridge *bridge, * If a bridge sets @pre_enable_prev_first, then the pre_enable for the * prev bridge will be called before pre_enable of this bridge. * + * Example: + * Bridge A ---> Bridge B ---> Bridge C ---> Bridge D ---> Bridge E + * + * With pre_enable_prev_first flag enable in Bridge B, D, E then the resulting + * @pre_enable order would be, + * Bridge C, Bridge D, Bridge E, Bridge A, Bridge B. + * * Note: the bridge passed should be the one closest to the encoder */ void drm_atomic_bridge_chain_pre_enable(struct drm_bridge *bridge,