From patchwork Fri Sep 16 18:17:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 2361 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id CA9A33F36F for ; Fri, 16 Sep 2022 20:18:28 +0200 (CEST) Received: by mail-pj1-f70.google.com with SMTP id d1-20020a17090a2a4100b00202ec7968c0sf208975pjg.6 for ; Fri, 16 Sep 2022 11:18:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1663352307; cv=pass; d=google.com; s=arc-20160816; b=RY9Mmfkl4QWSX+4UpH5iMGbuB1z29TYbk14hJKwzlUBlcg5hrwiGuwGMvibQrTni/M tcqI2heggED0n1z3T9vHkD1Yued7H6032lgTsy9vDA3atgAcSxsTNCHXABFyXQ3OeQ4i t/oUCYIcz3a2QPIQfqzG1xrT9+90K4+cFP7TB39s+9h4dWlta66vpu26U6/GU2UZYFX1 1X0MRojK98OxGJhjavWo5Gf/bV+29fBuvVYTzqZ79R813f4XAMU7jbhm/pXTxj2bxBeh pmz5+92RpGKNsCM9ch3z5xoHiH1oHsqDZ5F4Wm4n5OBAWib2+0alNaCuWIi4XZuKmRF5 /oqQ== 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=+j6S7KWRrW+z7MWKREiotV1/d00Ctu3D9rPqTN5J150=; b=Yi4CxHhKMpJud/tGj5pII1p3arjHepmNsntOay0PeEmxyv71uyAlYMrS5UJAFWFXYC JJBxF9PemEDPvLK1N+Fpc1vL/nDaSw46LC6YfY8Bev2BM07kQFGXyOFO0mJT0ZjMC8I+ MUE4+ae/V/x+2YfZ54zLcK57E84/Bzdw/TKO+yUXX1QdFFW8YNbYqzM00ycFR54HM17R gPBcmGT9a3LB4+HEa95tLi96wklHhHmfdQ1b91EvX8I3Ktuogs69jUKZd4MwdB4mQ+BA FD2NtJWPQPs/H3glEK75B0ze3X2mB6z42FlFua+qOQPfnFhgdzt9gV7YGh54Xi68IXOm ViMQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=W1QEp6HF; 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; bh=+j6S7KWRrW+z7MWKREiotV1/d00Ctu3D9rPqTN5J150=; b=KIzJuiS5tkSaL6q6MLyGA9k4OeLymnzVqmTBcP7tBqVBvM/Z4wYvNXYUmwv5CRasCq R2Wv9oaxtec0aiIIR3oXlDjcrR8jYkN2cI8jANQEwiN2ijQgNNf2YbhFSzZXSQP1/rlz VjOn3X27aBENWrCKoWyrAGH0ja/jQMgYC29mc= 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; bh=+j6S7KWRrW+z7MWKREiotV1/d00Ctu3D9rPqTN5J150=; b=G9z81InQISDZTQ8U4vEIay582ui+h99IfrgCFg1gsjYNyjlWp1ZQBx3WLt8hKF/aCd PJmY9Md872AbujgdcorwZKgwtYeVQN7kZ3dDMNjBhSSq3HMX9lC+Y+qxnjWLbfeaPImP zuLDjz8oy7r4DVzWTuEYOL1A0bDOyqheoR+s9ElebPUII/Mpv2HNfwWIA6i3/8T9dDQi aPg0nXbgJJLuMuo3JPg0P/HnZ/mckaBcw0hbYOeYCgHgCiexhS1XT8BhK0luWqVuyQUQ fmTUuHO3k7DU3mxxTs1ayyAwT+eN5kEX0OnXMIvPOW13FbMI5iL6dD29VoT1TpeiVW79 nuFQ== X-Gm-Message-State: ACrzQf0Ys+YGVd2bKE3QlZ0POweHk9kWBnOKIucBDNDizBP1OZA2T9oq v373mPKNG7+xVP2h8+GVEQe95S5t X-Google-Smtp-Source: AMsMyM4jlBmMNyf42WIzeth6tQydInMTT+0PZkmtDR57CunleObxji8tjgbnoVOUYs9WWdHTGAB8CQ== X-Received: by 2002:a05:6a00:15c4:b0:54a:13f1:1118 with SMTP id o4-20020a056a0015c400b0054a13f11118mr6198138pfu.52.1663352307476; Fri, 16 Sep 2022 11:18:27 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90a:b88c:b0:200:8151:e64c with SMTP id o12-20020a17090ab88c00b002008151e64cls1927769pjr.0.-pod-control-gmail; Fri, 16 Sep 2022 11:18:26 -0700 (PDT) X-Received: by 2002:a17:90b:4f4b:b0:200:876b:c1c8 with SMTP id pj11-20020a17090b4f4b00b00200876bc1c8mr18244645pjb.32.1663352306630; Fri, 16 Sep 2022 11:18:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663352306; cv=none; d=google.com; s=arc-20160816; b=n8mlFghkq8DiqfRwuQpocyjT/L2duWwygmJ7HsQqw/FA0jDjtTgiinnDYfQQW2CEis 9a1BO/okaxGZjECG5CmBjO38O1uFDPeX1WaYBC3nw/G79svg23dY82TJ33uP+N12R+17 0X162C2AmmTR/45SotGpz+XSQ5Q2LcycVV9t/rrOzMj6z18aJFjEVhn4Dr5EtKNBEBTv TIol5VKK6qnCqinOmDcB/be97hjI1fPywMKgN+Gk4CvO2xRQ9vlILjWh6e33pbG1i4TI ugCv/Y6w2uMTnTFXyuHlBL1+IfpShZfa68eaf5pMBQ9Vxs5wKN3VohOJnLNM9TjNwXvM iysQ== 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=evpdRiLLPj8Lu/GCT1crgCmnHzo/7eQnkgWkH42QQ/k=; b=Ig9v5jKLuEZncltx3u7t0dwvh8vc8NthA4RMWuyBvzgGYs0K72U22YgCQx8elOl1Ss HpYAyWbO7Uc5dF/9Y1p8R65mpxwrXFWacu6/AwgMs/k3TSUR8mvs8A5/hyWjZS8l5jrK 6qv1gpSr3q12iHxxqbMzQZLPfN2KDG/Fg7w1c5lb1oraEsspteeKg+XyR+5SdruQ8vLh pk6hvoNHiVJWS/NN/SWgmECPFgyxIvSaQC6P+I2crBY2370SHDlpFR7+9iDt5qCmbqja RBgJCqUZuKau3l34gfUFLh45Bpd6cEmwwsDZdtnx8ndE26W+bOT/vuq3KvagPJ+811nr FFoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=W1QEp6HF; 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 n17-20020a170902e55100b00176a84bbc0fsor8842739plf.92.2022.09.16.11.18.26 for (Google Transport Security); Fri, 16 Sep 2022 11:18:26 -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:db0a:b0:178:2636:b6de with SMTP id m10-20020a170902db0a00b001782636b6demr1104299plx.58.1663352306312; Fri, 16 Sep 2022 11:18:26 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c00a:a073:ae5d:6ee4:5c2f:6733]) by smtp.gmail.com with ESMTPSA id d14-20020a17090a6a4e00b002007b60e288sm1770000pjm.23.2022.09.16.11.18.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Sep 2022 11:18:25 -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 v5 01/11] drm: exynos: dsi: Restore proper bridge chain order Date: Fri, 16 Sep 2022 23:47:21 +0530 Message-Id: <20220916181731.89764-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220916181731.89764-1-jagan@amarulasolutions.com> References: <20220916181731.89764-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=W1QEp6HF; 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. v5: * exclude the NULL replacement in exynos_dsi_host_attach v4: * none v3: * new patch Signed-off-by: Marek Szyprowski Signed-off-by: Jagan Teki --- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index ec673223d6b7..f4e3d2518ad0 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 = { From patchwork Fri Sep 16 18:17:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 2362 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id DC8773F36F for ; Fri, 16 Sep 2022 20:18:37 +0200 (CEST) Received: by mail-pg1-f200.google.com with SMTP id a12-20020a65604c000000b0042a8c1cc701sf11317914pgp.1 for ; Fri, 16 Sep 2022 11:18:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1663352316; cv=pass; d=google.com; s=arc-20160816; b=APja6sF9mf5WYLnMKwEBXonarcO1eFZn2CLqdkMtLRjNlzmK0RmBcSXoRyBMfwGc7E DRMIDXLUFrMnz0K/hftMp4MwpNXrq+C9uQef9BiLQJ/qqAk5GGyVcjELrVFbsx2Kc+CZ dfwhm7xiSEkBRUyBcS3XWGZInsFTJyy74e3tyn59CT/5VUOFcecU4Q5Jb6Dm7XIxYSld JAxnTfPwd7MGfw0MnnxwmbSmX4JNq7RMZ3GREzTqAUavBHwhXzkGSlKWovwOXjKs8/pq eCTLLdWNORpycONCwsM8g26eimdAcg1jWsU4QSpDbKGZrd8aJ2HKVtA+16w5CXH6sege JIJA== 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=dXoJ7H5mCPYbiowdp/bdcfO7yexvHPNiE8h3FKHiHvA=; b=Lp+ffi46F6wu1/TMIu7AsJd96FN2CrMTdqPX/33NyY0NKdlaKRcbIxug08a9J05dXC 7t5MhdNSgAq61mj89ZK+q7UADj/GAZEOUnBwYE9gUcUxayFOr7kkjUrjfNrFHEUDeRIt HMHe2CNhZ5IeMWcpX4t3OvpezYta3zlmvvDhNgbAgwF+Etmb8wLDQFYL9cd5WZBjuto9 E5JxEsngAd5KX5ll8jD2Nfni+AA3jXUwbuCO3XQR51sBA0IthNQO2uN199y99booYR5Z 5qc2uEQrZCORkSNfXlgN3ANHbqppuz2Be6f6aTrqKdIafHKGytapBxq735sLN0enilet POwQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=R0ZsuJhL; 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; bh=dXoJ7H5mCPYbiowdp/bdcfO7yexvHPNiE8h3FKHiHvA=; b=DjjXdnSHmPsSNVqknJ6fMgDwXg/0733z+Cr2Cpy9JPmcqby5sgOjM+2Exa4CDcxuQL 0Y95qRRMqqq5TGBZUg5AmDUkYtEJIP1q/fnOzquFE1a5JaiqK4mUdF/YPvS9dROYTlWw WqKNjPTJp0873ulzQfyZ8JCqg/Xdn4j+5wPYQ= 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; bh=dXoJ7H5mCPYbiowdp/bdcfO7yexvHPNiE8h3FKHiHvA=; b=PDrXy5JOpKaPQ7GrMHXUpvUQy8rvCpGL5EhNM30Cj46asW6YpIiRLadM/vsWpHQ1Cf 2ZT6PraOmax9yhe+39u65ED/lD3Y5gNL6T25fKqafDkccbSgDLijIV598oGOaHnshM9V Otxac0umHlVIcat/kCJuFfMz5zDf+3c8APeEqTdc4IuNLLRLoaoSxikRGfiO5EEOeNlu PV6nqh5XXappLbf1tnr1ZLYp956B/9hTaRf7lUk+1T1l2vafvwPkO98bS/4jqMYfTqlC x5S6QpB3w4FKeJGDwfwhTSVyHrxjsvqEr0P+GUgn9KXsFkwPj4DoCZMxnhFN3Kh8bIBB rXDg== X-Gm-Message-State: ACrzQf1Mf/Kzly0SwTxBHVY96ebdIlB9qau/lyiAQahOPKFlLh5pHp6B JIO3BodGJnmDENtVVFS0Da+Dw/90 X-Google-Smtp-Source: AMsMyM6Kj74j7pICs9rXR0jUmVh6k7zslq/iTEgab67ICi+PPBGrcDcKJ6mczHS5FSueMWb76Hcx+Q== X-Received: by 2002:a17:90b:4d0d:b0:1fb:a86d:e752 with SMTP id mw13-20020a17090b4d0d00b001fba86de752mr6776975pjb.120.1663352316500; Fri, 16 Sep 2022 11:18:36 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:7404:b0:178:3881:c7e3 with SMTP id g4-20020a170902740400b001783881c7e3ls10126103pll.11.-pod-prod-gmail; Fri, 16 Sep 2022 11:18:35 -0700 (PDT) X-Received: by 2002:a17:902:bc47:b0:178:2321:3809 with SMTP id t7-20020a170902bc4700b0017823213809mr1030635plz.147.1663352315369; Fri, 16 Sep 2022 11:18:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663352315; cv=none; d=google.com; s=arc-20160816; b=KiZy5znkWj8sCeFrnr9Wibj2YZJgAT6TFpxTjB9y6n9AHlhqwLlJwm4WeCY+x9ajbx g5RlJe3efbTMX8fAuDFAhvC7klVgbo44Tf+mGVw0Bsm5EpSUh3pAt0eJhj5bmc9ah1kU qC7sqFqTqtkxq3PCm/R8odrjp7TCjdHypmBjRvRk2dmuePzL3hrNTfkoXCXaESv38DNP VMImKm2QcY+Aq3lWBt8WUTJdcYcMy1HpqFLilqBv5n3HLZwqis4hOqIsKkE62GGB7fiz nUxR8hTitBxLFqwzfX+PlvTykeopFbv8Ysj4mB+Qj6V5nht59z0s4Uvokb4GLJti38J8 6qMA== 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=Fc62WtE+diGKtw2GrY24ZBJ7TC7RXBsfA1l7ihTvf/0=; b=Jvio+X1fFjDq1I9zE9f6SO/zBa1JcKU8ziM2o4bs4WbHCztXsFFTUNSLqpFmEyhWVz 3/bWWkmiKOIYVqHnsvDXsYc14i6SdLegu/9K7paG7nhSQ5NbE6w6PFLzzyrv98XSDnAL 0RpoSNfZe6BhTwKWfakuazPIPZbG/3SKaIPX3QCXDjAggMTrQCPcMoojYpP1bxaMnzjF eweF1SkWn2a6PCFioM48Bz/Uk3LzLnIkQJ7+uhIDvvnEGrS0KqSfeM5YLxZ+0pX8DB1J /diK/IPZPQWC6j1+lzRp5//b1jlDemZePV5h0xTFlPTvIhT5lYfklHb3MA4MJvyuDL85 PZaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=R0ZsuJhL; 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 s6-20020a056a0008c600b0053b3b9f729dsor10302974pfu.78.2022.09.16.11.18.35 for (Google Transport Security); Fri, 16 Sep 2022 11:18:35 -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:aa7:8115:0:b0:537:bd1e:1519 with SMTP id b21-20020aa78115000000b00537bd1e1519mr6132882pfi.14.1663352314327; Fri, 16 Sep 2022 11:18:34 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c00a:a073:ae5d:6ee4:5c2f:6733]) by smtp.gmail.com with ESMTPSA id d14-20020a17090a6a4e00b002007b60e288sm1770000pjm.23.2022.09.16.11.18.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 16 Sep 2022 11:18:33 -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 v5 02/11] drm: bridge: Add Samsung DSIM bridge driver Date: Fri, 16 Sep 2022 23:47:22 +0530 Message-Id: <20220916181731.89764-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220916181731.89764-1-jagan@amarulasolutions.com> References: <20220916181731.89764-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=R0ZsuJhL; 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: , Samsung MIPI DSIM controller is common DSI IP that can be used in various SoCs like Exynos, i.MX8M Mini/Nano. In order to access this DSI controller between various platform SoCs, the ideal way to incorporate this in the drm stack is via the drm bridge driver. This patch is trying to differentiate platform-specific and bridge driver code by maintaining exynos platform glue code in exynos_drm_dsi.c driver and common bridge driver code in samsung-dsim.c providing that the new platform-specific glue should be supported in the bridge driver, unlike exynos platform drm drivers. - Add samsung_dsim_plat_data for keeping platform-specific attributes like host_ops, irq_ops, and hw_type. - Initialize the plat_data hooks for exynos platform in exynos_drm_dsi.c. - samsung_dsim_probe is the common probe call across exynos_drm_dsi.c and samsung-dsim.c. - plat_data hooks like host_ops and irq_ops are invoked during the respective bridge call chains. v5: * [mszyprow] reworked driver initialization using the same approach as in drivers/gpu/drm/{exynos/exynos_dp.c, bridge/analogix/analogix_dp_core.c}, removed weak functions, moved exynos_dsi_driver back to exynos_drm_dsi.c and restored integration with exynos_drm custom initialization. * updated the commit message [Jagan] v4: * include Inki Dae in MAINTAINERS * remove dsi_driver probe in exynos_drm_drv to support multi-arch build v3: * restore gpio related fixes * restore proper bridge chain * rework initialization issue * fix header includes in proper way v2: * fixed exynos dsi driver conversion (Marek Szyprowski) * updated commit message * updated MAINTAINERS file v1: * don't maintain component_ops in bridge driver * don't maintain platform glue code in bridge driver * add platform-specific glue code and make a common bridge Signed-off-by: Marek Szyprowski Signed-off-by: Jagan Teki --- MAINTAINERS | 9 + drivers/gpu/drm/bridge/Kconfig | 12 + drivers/gpu/drm/bridge/Makefile | 1 + drivers/gpu/drm/bridge/samsung-dsim.c | 1687 ++++++++++++++++++++++ drivers/gpu/drm/exynos/Kconfig | 1 + drivers/gpu/drm/exynos/exynos_drm_dsi.c | 1767 ++--------------------- include/drm/bridge/samsung-dsim.h | 112 ++ 7 files changed, 1935 insertions(+), 1654 deletions(-) create mode 100644 drivers/gpu/drm/bridge/samsung-dsim.c create mode 100644 include/drm/bridge/samsung-dsim.h diff --git a/MAINTAINERS b/MAINTAINERS index 1c6a5d0fac39..db341eb0f4bf 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6634,6 +6634,15 @@ T: git git://anongit.freedesktop.org/drm/drm-misc F: Documentation/devicetree/bindings/display/panel/samsung,lms397kf04.yaml F: drivers/gpu/drm/panel/panel-samsung-db7430.c +DRM DRIVER FOR SAMSUNG MIPI DSIM BRIDGE +M: Jagan Teki +M: Marek Szyprowski +M: Inki Dae S: Maintained diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig index 57946d80b02d..8e85dac9f53e 100644 --- a/drivers/gpu/drm/bridge/Kconfig +++ b/drivers/gpu/drm/bridge/Kconfig @@ -231,6 +231,18 @@ config DRM_PARADE_PS8640 The PS8640 is a high-performance and low-power MIPI DSI to eDP converter +config DRM_SAMSUNG_DSIM + tristate "Samsung MIPI DSIM bridge driver" + depends on COMMON_CLK + depends on OF && HAS_IOMEM + select DRM_KMS_HELPER + select DRM_MIPI_DSI + select DRM_PANEL_BRIDGE + help + The Samsung MIPI DSIM bridge controller driver. + This MIPI DSIM bridge can be found it on Exynos SoCs and + NXP's i.MX8M Mini/Nano. + config DRM_SIL_SII8620 tristate "Silicon Image SII8620 HDMI/MHL bridge" depends on OF diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile index 1884803c6860..dae843723991 100644 --- a/drivers/gpu/drm/bridge/Makefile +++ b/drivers/gpu/drm/bridge/Makefile @@ -15,6 +15,7 @@ obj-$(CONFIG_DRM_MEGACHIPS_STDPXXXX_GE_B850V3_FW) += megachips-stdpxxxx-ge-b850v obj-$(CONFIG_DRM_NXP_PTN3460) += nxp-ptn3460.o obj-$(CONFIG_DRM_PARADE_PS8622) += parade-ps8622.o obj-$(CONFIG_DRM_PARADE_PS8640) += parade-ps8640.o +obj-$(CONFIG_DRM_SAMSUNG_DSIM) += samsung-dsim.o obj-$(CONFIG_DRM_SIL_SII8620) += sil-sii8620.o obj-$(CONFIG_DRM_SII902X) += sii902x.o obj-$(CONFIG_DRM_SII9234) += sii9234.o diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c b/drivers/gpu/drm/bridge/samsung-dsim.c new file mode 100644 index 000000000000..ccaf87e19e81 --- /dev/null +++ b/drivers/gpu/drm/bridge/samsung-dsim.c @@ -0,0 +1,1687 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Samsung MIPI DSIM bridge driver. + * + * Copyright (C) 2021 Amarula Solutions(India) + * Copyright (c) 2014 Samsung Electronics Co., Ltd + * Author: Jagan Teki + * + * Based on exynos_drm_dsi from + * Tomasz Figa + */ + +#include + +#include +#include +#include +#include +#include + +#include