From patchwork Fri Dec 9 15:23:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 13069743 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 1F333C4332F for ; Fri, 9 Dec 2022 15:28:00 +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=4cxVGV4bDZ40OAR3nRzt6Jhd4vYhlDajF3Q6c8QdfYM=; b=fmDVxL9vy4h7Sl J5Ydmu+rgWuJJo19Aj7Ourv9QnMynA2jBAbDJBlkaExrRcxR+gFucVN5vCQuoZN0OdwJoc26Uz1cS ILWKO0AOXZxfNFfOgLPsJLSU12TDJSMyuBNVLfiWpvEecjnAacph1AcfoPsYoOFcZTK4c5VIsP+mu ciBB06/0P+sypeui0T1R3W9Wz1a5wIlJakAvP6jcQtSfWgcBwgJJqY+c1pLfs8m9wuO8vNo1Rffyh 9xH1BugNAgSK3CQPcgMrd8Fc80KLSzwOkIwwr/RB6aHTrKZg8T0mC+PdcJZncQL4nNsTybsIcuhyV 0Kgn6naptgtDZCemVM2A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3fGq-008yYL-63; Fri, 09 Dec 2022 15:26:40 +0000 Received: from mail-pj1-x1030.google.com ([2607:f8b0:4864:20::1030]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1p3fFb-008y2L-7A for linux-arm-kernel@lists.infradead.org; Fri, 09 Dec 2022 15:25:24 +0000 Received: by mail-pj1-x1030.google.com with SMTP id e7-20020a17090a77c700b00216928a3917so8458037pjs.4 for ; Fri, 09 Dec 2022 07:25:21 -0800 (PST) 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:subject:date :message-id:reply-to; bh=PD94MxZvqnUHdTxMPOsMMefL4P5i3Lz9kxEOBEFMSCo=; b=fgweV2Uq8N0wlYzgaQf47mr3LjVRC1L35wZBye2l2ywZp+X8ADFusTUNhQw0f6lk9P 27uxEklHfJHgkztkRzT1ebKwWhf2Udt8AhGxxpIPfi97mUiVEHs+clm3w73iqJ7r9QNu FXBQ4h7VvNyx0yT2X5+zkU0QluR+oe92T2T3o= 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 :subject:date:message-id:reply-to; bh=PD94MxZvqnUHdTxMPOsMMefL4P5i3Lz9kxEOBEFMSCo=; b=b2wmSBjBKMBoA7rrGuI2kHcqHMM/ZUjsy4iNVa7yD1UvzWzx9htXI2oA2bjuQ9mzyr 4aqVvNB3IWyAhelkcET7Wk0TAjbPdlzUu65B+roAvRYAEy3gaZZnRubxZp0dxS8wV9d3 yX40LkvUqb/zTNZ72CQ5SIT5LIO9nNhkVuxgkrLUh4zGg9jFnmSqdZTQuqdFsPhH0nNm it2FMIAaLPUU4htpklY7Kh8hqRR257E5N8EBOVPr8AiJzQeJTnDyzGGkZEFFgh+hrtKe NvKSxMSUOK1D297pnxvHq+aa1xHr5V318zs0KqBNEwS9KRNeKBPfc0z9sSeu8Bg+CGV/ oDbQ== X-Gm-Message-State: ANoB5pljq7uGCtxHBUaBcti2RkAbgL+qd+IsmwC8TYBXq+MdhGtscYMo zPw9DOetbrCu+vla2EhqR4o86w== X-Google-Smtp-Source: AA0mqf55QoYZLG6Nui2W9ugkOWOA5s1EfgG0BbVEJCTMmNiChg7PB7qm/TxsNC8i1BTTAMeUFXU6Ww== X-Received: by 2002:a17:902:e845:b0:189:f8d0:7b8f with SMTP id t5-20020a170902e84500b00189f8d07b8fmr6620275plg.63.1670599521074; Fri, 09 Dec 2022 07:25:21 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a809:6ba1:bbda:c542:ba0b]) by smtp.gmail.com with ESMTPSA id x14-20020a170902ec8e00b00188c5f0f9e9sm1477587plg.199.2022.12.09.07.25.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Dec 2022 07:25:20 -0800 (PST) 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 v9 03/18] drm: exynos: dsi: Restore proper bridge chain order Date: Fri, 9 Dec 2022 20:53:28 +0530 Message-Id: <20221209152343.180139-4-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221209152343.180139-1-jagan@amarulasolutions.com> References: <20221209152343.180139-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221209_072523_296339_A1B2E3CD X-CRM114-Status: GOOD ( 12.68 ) 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. v9, v4: * none v3: * new patch Signed-off-by: Marek Szyprowski Signed-off-by: Jagan Teki Reviewed-by: Marek Vasut --- 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.