From patchwork Mon Aug 29 18:40:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 12958340 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D7496ECAAD5 for ; Mon, 29 Aug 2022 18:42:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ymbArIKIr6GIPMfh8ULjqIFZ1M+0AlCdYxwQoT2wa+M=; b=is2sIKto7DinvI 33ieua64KkRzP7pmd+jONVOu5I6eYBUmD8EHJdoralh3OTIkPrR2jZMkSCmscDnIne4+A9vqGkjhU TNMB1Z6D9I2c4yR4UM0PWImNP6XYRiF+m07KFIaMj3ezX6BtyBdtQDu7Hxx7wfWYZXEL0U7O36yo8 NS9R4v3y24oqsSUUFmpS0s7y75vq6Jyore4EbpLDtxSRHdass+tuZhaF3shIOBGYGMFtAfwu/e7cV 7HDgd6xpPaihswS3A6XN+Q2r0SlR/5GnNynDgmQ/YlTm08R4/KiXwVKbxRvaYOOQ7rE5xQw8ffvMV XXzwMLRiwJ05NbKgmJ/Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oSjhA-00CGUL-B8; Mon, 29 Aug 2022 18:41:12 +0000 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oSjh4-00CGSk-41 for linux-arm-kernel@lists.infradead.org; Mon, 29 Aug 2022 18:41:07 +0000 Received: by mail-pf1-x42b.google.com with SMTP id t129so9048056pfb.6 for ; Mon, 29 Aug 2022 11:41:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=P8VFeEM/BFJI467dCNlhyUmXQlADynuLsgzoWk47wCg=; b=EPSFr67+xfTIyGBIh3RYgbAX5fNxJaVR6R4ntWQPcH3goFHbRgOpUTUkozy0PyqKZQ tWUTihCpY0hC4P8R/uimrljrbbklIXgyvl9PBBh+xn73amdL/ko7cBn8seP9Xdh4fzFO CN0iAuNlqPllYtuV4HfqBaBP7P2pxnhBzqWQ4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=P8VFeEM/BFJI467dCNlhyUmXQlADynuLsgzoWk47wCg=; b=gxlILPzpKI3VlLLtQiYKS6MqQp92Z9DTQ1HPuIRdirAhwSSD4x+M2RPKc7MaM8p8rH PM5QzINRPKPsWBdNjtizrznqWOb2WwR6CoLql7nIWu0DilORkpHAiPLWYw5qHCskJ4Kz /gNHcPleD1IR+Wfgq7+YB/Ksw1VrfvuJfGIx/N/GOrHCNORDzqREk/odqppv4/Yj/N7v gQh+IzHbnfOjOJAhs9zBSA44gm890B4pDMKIxlRwokVl2NA8c0emE/oGszMSv5/1mF8w +vd95EeQ0H6qdZGfuC+ryvhQdaBBxqOOiaGJWNS2qRURD4lyGDk+7iaPc0leFwNTEMjx 5Yzw== X-Gm-Message-State: ACgBeo1XFRqft5L5eKChWEpPaHY7jnIMknr0jewXtYod9kSFvg0d19cs BJiu9JHfpzE7q5seoVFJfZnvUw== X-Google-Smtp-Source: AA6agR6PuGUOWRB54FiVXcq+DeYxGBCJLzqGuDD46zbx+u/8z/espw13ja8BVRylsZBCfn1YgyGaPQ== X-Received: by 2002:a63:1921:0:b0:42b:6eb3:bce5 with SMTP id z33-20020a631921000000b0042b6eb3bce5mr15304041pgl.231.1661798462536; Mon, 29 Aug 2022 11:41:02 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c00a:a073:43f7:1644:6259:830d]) by smtp.gmail.com with ESMTPSA id k13-20020aa7998d000000b005385e2e86eesm1619042pfh.18.2022.08.29.11.40.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Aug 2022 11:41:02 -0700 (PDT) From: Jagan Teki To: Andrzej Hajda , Inki Dae , Marek Szyprowski , Joonyoung Shim , Seung-Woo Kim , Kyungmin Park , Frieder Schrempf , Fancy Fang , Tim Harvey , Michael Nazzareno Trimarchi , Adam Ford , Neil Armstrong , Robert Foss , Laurent Pinchart , Tommaso Merciai , Marek Vasut Cc: Matteo Lisi , dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, NXP Linux Team , linux-amarula , Jagan Teki Subject: [PATCH v4 01/12] drm: exynos: dsi: Restore proper bridge chain order Date: Tue, 30 Aug 2022 00:10:20 +0530 Message-Id: <20220829184031.1863663-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220829184031.1863663-1-jagan@amarulasolutions.com> References: <20220829184031.1863663-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220829_114106_196262_8D14EED1 X-CRM114-Status: GOOD ( 13.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Marek Szyprowski Restore the proper bridge chain by finding the previous bridge in the chain instead of passing NULL. This establishes a proper bridge chain while attaching downstream bridges. v4: * none v3: * new patch Signed-off-by: Marek Szyprowski Signed-off-by: Jagan Teki --- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index ec673223d6b7..e5b1540c4ae4 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c @@ -1428,7 +1428,8 @@ static int exynos_dsi_attach(struct drm_bridge *bridge, { struct exynos_dsi *dsi = bridge_to_dsi(bridge); - return drm_bridge_attach(bridge->encoder, dsi->out_bridge, NULL, flags); + return drm_bridge_attach(bridge->encoder, dsi->out_bridge, bridge, + flags); } static const struct drm_bridge_funcs exynos_dsi_bridge_funcs = { @@ -1474,7 +1475,10 @@ static int exynos_dsi_host_attach(struct mipi_dsi_host *host, drm_bridge_add(&dsi->bridge); - drm_bridge_attach(encoder, &dsi->bridge, NULL, 0); + drm_bridge_attach(encoder, &dsi->bridge, + list_first_entry_or_null(&encoder->bridge_chain, + struct drm_bridge, + chain_node), 0); /* * This is a temporary solution and should be made by more generic way.