From patchwork Sun Feb 14 19:41:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1635 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 087043F158 for ; Sun, 14 Feb 2021 20:41:42 +0100 (CET) Received: by mail-pl1-f199.google.com with SMTP id j1sf4867185plt.0 for ; Sun, 14 Feb 2021 11:41:41 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1613331701; cv=pass; d=google.com; s=arc-20160816; b=xR+P8qZ8SdbaucbPkOydgrx2xbI7K8mANjKiS2PrjBLrYNzuLi7L9ltCXpPEvkuASU aZVX5fT8cnwlNFAJ4rZ89p3lc+u2RGiQXLDuElKAsOE/6u4feXK+LBNqYB9KvIrYzhEK lGnXsQtOFHtNGRWrIpCRFV3KoteXwg5IgvvDqScz5sphEO1MwX0gwpw1oggkKLSD+G4H xo2A2JylCf4GSH2DJ4hW3eSwaac9tgxxd+fZFkH30Z2b8PpYToRm6sZ7NifITnA9GVM8 sBCqPcvBGhEY0f1gG3My2QyY0Gv4JNMeg84xsvMeawRgwD2hbbit7aemZ8oB1c9XQt9v ILfw== 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:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=wehm6zyGtF/a4UtyyLMMy3cAUYcg/rB7jtpPzH1QRbY=; b=g78djVT5X3wCJUNe7EUmNQa/OG/icgI4PlJQv/iCvG6ulcwYDGFvP7WHsfAqrQWSzo OpNUWU+jp6nZOaV+uAK3W55VLQz7gljjnuI+2ys56NKEVC8iqstn4RS0ziEIhWme6zNd n2t6bWC9swdsKq+fZTZ/UDBFrJo4/Dw1XzvPmQir9Xkk4zzXFlQ3m+7Cu5WDqnbjdx8N d3PuttFnfq5rs3zN1lOqQzPpVwltjE6/n5I++U4zz66J1yRVardH77xt64Bv7UpP/yTZ munDVjLBLYW9PTVbpUctTGUhNy1+LH744+P84GUiSNmtL4u5ZJA9wDjcfYXqC+Eu/xG2 YXng== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=aO2QjQGa; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=wehm6zyGtF/a4UtyyLMMy3cAUYcg/rB7jtpPzH1QRbY=; b=Pm40cMIgNIUNe4r8S16QYEu4sYt/xaZEUExDbhNvuPWyhygldude/+YLX1vbHi0DTv YBEsiqV3YrhjD0/lYQ4OmiViI2EwIAJqlxIG14QskP12JJ5gGjzjvOBOC/FgCu2v6mVj O14lSevKvo6fKRBQGNdpd1FBQBI1ZCJWt3le0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-unsubscribe; bh=wehm6zyGtF/a4UtyyLMMy3cAUYcg/rB7jtpPzH1QRbY=; b=M8osRr09BYj1Xzb/STwZw/1JOHN9kq6OR36bhWzcjAuiotxWH3S9tKJBnJ03Ui0MUC L+0gA1lERIitlCJJtcxuctAc00HbLz4mmJ7Bz7GgfQf2dXfxsrhEqvEmsn7pRJRYyMa1 UOOv3gmSIiYWebp9EuAIjIFoAylj0lcU4ugzaLHwOjZLdM7B2v3/dbg80OgSmS7h9qUb 1K462X1e4CeRBhF8X9zLJ3EztD4FEqntfYDsCUnznSYbobcIGRN/b1eHQa8vvHGJ9fNI dbE2FUJ24GyCA7rSGt/PtbBbfsCUjuKB6zlyV5Dy4faeP0Wypij7c5FO3/EgwG89sRSg b47Q== X-Gm-Message-State: AOAM531WpBm/aWEEEN9XDnpUkTtg2SEUvcGGiBuKroU/iwQQJKOGMnVB WNecVmHQTpedNfyFcguVeYXykXzJ X-Google-Smtp-Source: ABdhPJym7O2fbXUmdKTvOfu2PBTlaAqrE81TTGPauAJ7vlkI04vStgqdG3hdooP5DgJa7ekNA+i2XQ== X-Received: by 2002:a17:90a:4e0b:: with SMTP id n11mr12921687pjh.145.1613331700863; Sun, 14 Feb 2021 11:41:40 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:5290:: with SMTP id w16ls7241701pjh.2.canary-gmail; Sun, 14 Feb 2021 11:41:40 -0800 (PST) X-Received: by 2002:a17:90a:aa07:: with SMTP id k7mr3184694pjq.3.1613331700234; Sun, 14 Feb 2021 11:41:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613331700; cv=none; d=google.com; s=arc-20160816; b=JNDaolX+pCAUWLjibWpqGo4hIy0FqHg5WZ9QAt1zRKIxd4LQFZwpGv4BfnPB2+VZoN izOxeJpxyHr5klT5cjDPvACoAIw5jHbOn9xWt6XqVTQemV4RwTqC6Yr853nnPuzqYMAI MZA1nuWKFBP6N//9VaA0K17ZyDXaWfLyk3+k43evTTwx6PHOMFb/LovGCkmkbNrk9Pew 5WiwUCK2MW2Z/ouDunKFVMi33cp7ZtZGC8mTD0th+zo4GFL6u3rCj1EXABzpnSBwFXf6 eA0ij9gKmroaxw7utaAOR0hKHehQ0gKvzyx7kjDowKFOLP9W9Mh5TiDbtxxUuki6bYQW OkIw== 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=uYz3kOtrZ6Hf5DjXT1UkBRogQ4J1lPOvWIWH1kd6QXA=; b=VQXQCQrjNz8ks4Ptk8LgydENKUurtKIPBlYE/xrfs3IA0937rcsbJrtkPqTTvRrRnK 3gUtiAiVendIQCQNStt4G9o94wtFj53aMLozDML7z3ghD0tuqYm0oG+QhWZ8tffcHUAv BKl9nUVTBVwyfhJflTCN9FTOkGyVAC4C/OFrXDa0Yk3KwJnaffZUamsuOT8q1celLtS+ CPBehWAWDmtlWqqzynYFM0BjXDFYlE3Y5jGGS+AJVLZwyFDtkfb4XcflnZbLSCmq3rNH ZLTWdrY9McAJFicviHtvU5jbhWqybV1+cjF7D89EwmDGuPQsmfWk/IJEmKprYj8lpwM7 EJng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=aO2QjQGa; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@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 n18sor146154pjv.10.2021.02.14.11.41.40 for (Google Transport Security); Sun, 14 Feb 2021 11:41:40 -0800 (PST) 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:90b:4d06:: with SMTP id mw6mr12223997pjb.24.1613331699994; Sun, 14 Feb 2021 11:41:39 -0800 (PST) Received: from ub-XPS-13-9350.domain.name ([45.249.78.214]) by smtp.gmail.com with ESMTPSA id 125sm15129247pfu.7.2021.02.14.11.41.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Feb 2021 11:41:39 -0800 (PST) From: Jagan Teki To: Maxime Ripard , Chen-Yu Tsai , Jernej Skrabec , Laurent Pinchart Cc: dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-amarula@amarulasolutions.com, Jagan Teki , Maarten Lankhorst , Thomas Zimmermann Subject: [PATCH v3 5/7] drm: bridge: Queue the bridge chain instead of stacking Date: Mon, 15 Feb 2021 01:11:00 +0530 Message-Id: <20210214194102.126146-6-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210214194102.126146-1-jagan@amarulasolutions.com> References: <20210214194102.126146-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=aO2QjQGa; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" 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: , drm_bridge_attach has stacked the bridge chain, so the bridge that gets pushed last can trigger its bridge function pre_enable first from drm_atomic_bridge_chain_pre_enable. This indeed gives a chance to trigger slave bridge pre_enable first without triggering its host bridge pre_enable for the usual host to slave device model like DSI host with panel slave. For fully enabled bridge drivers, host bridge pre_enable has all host related clock, reset, PHY configuration code that needs to initialized before sending commands or configuration from a slave to communicate its host. Queue the bridge chain instead of stacking it so-that the bridges that got enqueued first can have a chance to trigger first. Cc: Maarten Lankhorst Cc: Thomas Zimmermann Signed-off-by: Jagan Teki --- Changes for v3: - new patch drivers/gpu/drm/drm_bridge.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c index 64f0effb52ac..e75d1a080c55 100644 --- a/drivers/gpu/drm/drm_bridge.c +++ b/drivers/gpu/drm/drm_bridge.c @@ -191,9 +191,9 @@ int drm_bridge_attach(struct drm_encoder *encoder, struct drm_bridge *bridge, bridge->encoder = encoder; if (previous) - list_add(&bridge->chain_node, &previous->chain_node); + list_add_tail(&bridge->chain_node, &previous->chain_node); else - list_add(&bridge->chain_node, &encoder->bridge_chain); + list_add_tail(&bridge->chain_node, &encoder->bridge_chain); if (bridge->funcs->attach) { ret = bridge->funcs->attach(bridge, flags);