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: 2522 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 882B93F039 for ; Fri, 9 Dec 2022 16:25:23 +0100 (CET) Received: by mail-pl1-f199.google.com with SMTP id b17-20020a170903229100b00189da3b178bsf4433347plh.7 for ; Fri, 09 Dec 2022 07:25:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1670599522; cv=pass; d=google.com; s=arc-20160816; b=a5LkOaO2ltuchkZHwvBeCRs34AqFgbsgBUlinJrPL7qoIY4y5GdYt2GR4WE4Qy3tkJ IRixgTdK8zkFxf688K4aP2xje0Z6bLqSQo0rQMpSEstSAFEXlup/cz1+HjYRnvW8lXTI 7NT95VMy2WQl8beOf6nX91d9Crt7uipydWx7SWR+l1Bt5gqW46RMq6VIKoAMRerE/Nta TY+BfO3e3s2oi75YC2Q6FrznbFKaStnKFAV7uRj3OfUyw0WwtnFuyCI03ep06y77C0iv DKEq0NsZgF8BcxFH2lcJkxIODL0PXVGlO6Sph7pPJOoXWAV4is58waHYNzah1J+7WUAi eKXg== 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=r7w46NrHoe69dcscAmfmCr9DuipwJamn/TUF4patgRk=; b=RWAbbIfrRDr5gih5UgqKmGrGPB+JKsKKd/xpbPv/dXP3ddN6LoybdNV0o0hL8O+AuL ZB6ulLT006S6PJSXjpGjHAQwwyeJppL+T3zVC3r/WFSOLd1IJsKJigZ2P9ByhIKGqmiS Cf+z/vDH7sOuSn9c5fEer5QPuw1EJ76rQQs6yRbX0sa8GZvngYkLHfN/hosC/RqTf6gI XZSPdzrcHvWaKd1kfziUrpgmGXdcaQhOVvDHUTheYSdaf9QYxiO/e/T0BrKPHUKlZJqs TCBZGM2f0Ic1Fg2+EJAJn6NqgFyov/iXNSOHOCyQp2af0iOSgwXZwCknn0v42Mpy8oj5 nisA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=fgweV2Uq; 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; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=r7w46NrHoe69dcscAmfmCr9DuipwJamn/TUF4patgRk=; b=qtrvkBZUofyLYaVIfHNoWevaQH3vJuI0J9/iYDGtsTUr6vexBjcB2Z+Fx0oViPDLq4 bbC843MaCNG7sy9wQroOEH889dmpVcRIjUkADn72ZSQ7hBEf2kH+Rg5eWyHR5czqvO+F +zMfJaJ9L0XZW5rnnzW6IrH+MoDTwHYlQQr60= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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: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=r7w46NrHoe69dcscAmfmCr9DuipwJamn/TUF4patgRk=; b=tza1ExzQ3yMOSVOoo0xxx+RXXG7hdH5K7rOfzgczXCmUt5V6bnxnKhCPO/S/mo0QuO dvDMKZTEJohLzSb5vOpWIt0spUqthvUIpwK4k5cXbBXrp/uxzJC7IFDp3l/8MFCdgRCa 9HXKWw6dWf8sO8AABilCoWqquG3kJBap8mJxuv7+2vUlFWR7w+HR+YDxHsrjjqs/tjCV vwHD0/kvRPrMgJb+4j3SJwh+6OFAvTt6wUNvhmnMOIKUE635aD/+091OwEQQUx2KnDxc lawJ8OKWAi7w+bMLI0iBhkRRSXhbkMJhFKp/Vxd8fxjvPWoXE6xIuVTv9NXCcQ+W7ptm uybw== X-Gm-Message-State: ANoB5pmZXUYczSPQYXXnUHieXsJl5jHovure4WxnElO1cYdTQyMS44A6 LtBJO0mr7DkJeSa+ABqI09e6uQKH X-Google-Smtp-Source: AA0mqf49EuHji3NURm5c7dwQXloq0ARqZYuAh8/gdoyTdIe3iJTA9oQVGMyc5ieovbL5eNkv0nERWQ== X-Received: by 2002:a63:511f:0:b0:478:99a3:2885 with SMTP id f31-20020a63511f000000b0047899a32885mr22698518pgb.151.1670599522322; Fri, 09 Dec 2022 07:25:22 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:2a03:b0:219:84d6:9802 with SMTP id i3-20020a17090a2a0300b0021984d69802ls11209959pjd.3.-pod-canary-gmail; Fri, 09 Dec 2022 07:25:21 -0800 (PST) X-Received: by 2002:a17:903:40c3:b0:18d:61f6:e254 with SMTP id t3-20020a17090340c300b0018d61f6e254mr319070pld.33.1670599521456; Fri, 09 Dec 2022 07:25:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670599521; cv=none; d=google.com; s=arc-20160816; b=WY5ptEL6odRIqruCcmQlQ7nvnHj59QKILEp/I2PP0p0H1Dh2JhvPYicZr+cNVjhZoH Xwpehvlyj8ZhWAchaPT60bVtZbCNTPLfhoWAWHPGn/aHE+oR47L8uIZ2VfRF/tSX8nmz 2hql8fb8te+frHd9VOpjOANyeF/d5w3BghTUaLyIZbQNprWwW578t1HFUxucoKWAvAJL 1JarXis4aBuzQp4GNz3NEkbpRpSYQm3x4npaleEUjOvHpRPKoyyUG8nuaY4zJIaoOt9Z 0rJF2zJ0bT40FBUpaDJcBT5NplSU3cyf8VWIuguhqHs74krqlHB+I5nO7S6S7tWpGIbK NvjA== 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=PD94MxZvqnUHdTxMPOsMMefL4P5i3Lz9kxEOBEFMSCo=; b=XZhjJLU7yby6oFt/8N23KDRIuw+LYqhYxrceVHJr4ysp2jajHVR/aUapgrPg5No93W +zZXwtEwPiomf0DJGAoPu/Wix7VEzxAte0rjcxFnEBODmVpsmWnO/1lxId/RguUWGku2 0uHxYloHv7Z/trZOfqyAKsvx2rfy4bZh8AIOVLlJJ17yCeEcoIpVkZvp1iaCr5DiyIph 20BN90CJ/qm8P9VYkBwGgIWrSP15hOmlif5TlLiL/e5PownXAVO449B8F1EiLlWn4mpu qtP/9+sJ5nJ/xJ3WMeqxexXguEo9a5hT8dR6Ph5p7VK2+b20aPwZEjLPlrkzBkx7U6CR AkjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=fgweV2Uq; 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 q15-20020a170902eb8f00b00189b235e347sor1031482plg.96.2022.12.09.07.25.21 for (Google Transport Security); Fri, 09 Dec 2022 07:25:21 -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: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-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=fgweV2Uq; 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 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: , 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.