From patchwork Fri Dec 10 17:48:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1807 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 1C0BC3F075 for ; Fri, 10 Dec 2021 18:49:07 +0100 (CET) Received: by mail-pj1-f71.google.com with SMTP id l10-20020a17090a4d4a00b001a6f817f57esf6380564pjh.3 for ; Fri, 10 Dec 2021 09:49:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1639158545; cv=pass; d=google.com; s=arc-20160816; b=QH3r+43Fj70rjQORdszeLqMKiKvYym/LDNDlBk/n20GfJB8jPrvRSphivR/CmBqlyl 91JAFwsDID9xrzt2rpkkUFbCtCKItX64hNKPylkPOAWdNbJQ9F9aPkGO/Bcl4XVy5bEP HBXD1v2NwXupJIh1T7gFIG0won9UiTU0d2Y3elnM+ur7VzRgWeZDc8elJjJP8Exws1zE GnO409IWMgtQdKOE9JNLNU/+I3tsePnep051ydBnqmx4pfJF6aVzXhV7Wb4fmGjA4TEd AyIREgySTqIl2S4OhUK1+I578XnzePWdLy8++CVany2gWJLyFiMmNlK4i0cXOVEcKd1C +aXw== 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:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=jmw4/X2oQJZxSXrb+UyL8zWawJJrdv39JHXpGSoahzE=; b=AmHzgT1MuPF87OpX2capxCwM9znyNErCiDlsmIoGfszrmlyiHukL3RXkIfMf9RY77R o2PTwVbRrPUeu72ufz+cfWgWlOZ8CkoeYHXIxw1e0/OMYlmgPwmki4T0urszPfTtLuFG SlC638BS7Oh0RwGNK/JZZQJ6g8UdrhzJfS30SJU3e61oassL71Iy984RDxTR0pFwB0vR lYMC8NQ6ApJx1IoziMzEYvOyl3JU2ziFbvfImTunFq3FNWa8u73DdnGSxOfNWh2+HD+R eZQweAlZbPrlQqbFEi9vZm6LWl8r+iGh19XTNVy7ruPIeS7yr02aLF9hiYx1LhJ3/yuh 9gvQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=efryh0xR; 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:mime-version :content-transfer-encoding:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=jmw4/X2oQJZxSXrb+UyL8zWawJJrdv39JHXpGSoahzE=; b=jqwf2+rX8LsM/MDZfsnUYICeyFVLzpiHD8HZH90CU++AeUpOyhXps4++qZtXEqK2/g Oik2yaN1LVqAAnWx0fR161yQ/GnbZYNUBr/5Mi+xrcnMM2T0iXyryhyq9zYZwQcYiXIp lkCU9zGdVetC27YP0blviTuzID3Kb/L2C6+Gs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding: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=jmw4/X2oQJZxSXrb+UyL8zWawJJrdv39JHXpGSoahzE=; b=N/n/+n95rMYBoAyhu9S7eUh8QoZGkvIm0Q5qGgykv4H+jqFC8hEsV6SJ4kN7OSFh+X nxmO0IfafuzO3zEGRh0OfDIbSpENFeIaAb5JVbvttNI4GJujUNXmDgzTFuVq+YtWFchc dKK/c6zLh5s7ajGjLHufDEImZtRrW/xv/GBgb9wkvKUmGEhnVg0hpfZrPjKfwwch/lgp X3Vvt/ZQnDlrOxvj+BU40XjJTh3p8PtFgvdQxSD41hGjHC+OlTb4wfhE4jjrkr+sAhy7 j+Jtwg7dCZ30wuDta9z2ISN/JSRdKUWT9DhkSiPB1kwG8Ok4qaO1ej9ZMxqanTOLmKPw QtzQ== X-Gm-Message-State: AOAM532bQfI9qxUA9RFuJ3vMg2rC4J4Ub/5lY8OgdbNui8PMFDIRGNYb LA4duQrAfi9knumfSLJdk4N7gB4b X-Google-Smtp-Source: ABdhPJwzUuGiN2+SGb28Ppqu/+9qL4/qmM5/rQnvZqEf8m9j2ofycS2mzs0hrdgcMBz6SpG/CPMXTA== X-Received: by 2002:a17:902:714f:b0:142:892d:a46 with SMTP id u15-20020a170902714f00b00142892d0a46mr76244172plm.39.1639158544903; Fri, 10 Dec 2021 09:49:04 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:c40d:: with SMTP id k13ls5210779plk.5.gmail; Fri, 10 Dec 2021 09:49:04 -0800 (PST) X-Received: by 2002:a17:902:e804:b0:142:1c0b:c2a6 with SMTP id u4-20020a170902e80400b001421c0bc2a6mr75707384plg.23.1639158544241; Fri, 10 Dec 2021 09:49:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1639158544; cv=none; d=google.com; s=arc-20160816; b=yy5q3PHS4+g6lQqtYLS42uwDwJS2G024nj9iKCKirj1chyfoYUw9Oxqzc3bSnmrIFC N7HFoQ3SxuWTZAoxp0TfIVMQbp/1EW5C3Nk+H8T6xyok1xE98BEZT4P+j4j3yrUzf9wP h8V/cT30HbVxG+2zxiQrc4FiwvCAt4lidbcNvObtmUv8YG/s8KPIP5sTuCsBEmU6ugy7 K5pWe49FyU1pM7UKfSuVgUoSK3sLHnODPerm57P/0wrrc62tPGIqAJ4V42ULq+XUn1Us KRVZZiMaLdfskKYnMj6z7RMHWT0Hj1Y/K36NMzswHYBrh60rLsM+LWqr+2TTRDVHHMCW g61A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=7rizF6SQspxzLCdP3CjSaNCfkk6zM5V4SVHSi6B5RlY=; b=iaOE0zRXTEAf3xm0Ibhl0F6q0pHgqfpGm6NAmS+Rw24Zb/66AXv1UvOJNMkn1H/PuN 6aFnZdTVkmI8vQwTGLiThyQqGe1MIK4HhhHGLRKT8LF1AK42/7SOoUF9GuF+H7n5MOtu y9xJCGgNRi0A2N9M11E7LKLuWAWuyhX+u4CVhhiPpwLI1r95ijhjaGxwGEteyhaUftqL dOzKRfQ9gqAsWVHlk5L2d/ZKLk4+yE5iC6+dd+VhmVLpDYYj/m7Ejq22Q1oHmyt9n9FG CVnK2Bxn5YYZtfiHYV7a34onLQgHYSB1tuhBrcmKrB78Deawu3il3HmQ+zit45dcwbTp yKng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=efryh0xR; 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 il10sor2997818pjb.28.2021.12.10.09.49.02 for (Google Transport Security); Fri, 10 Dec 2021 09:49:02 -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:90a:e60a:: with SMTP id j10mr25948578pjy.169.1639158542156; Fri, 10 Dec 2021 09:49:02 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a0a9:28d6:2bae:633e:b110]) by smtp.gmail.com with ESMTPSA id w1sm4039644pfg.11.2021.12.10.09.48.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Dec 2021 09:49:01 -0800 (PST) From: Jagan Teki To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Yannick Fertre , Maxime Ripard , Sam Ravnborg , Michael Nazzareno Trimarchi Cc: dri-devel@lists.freedesktop.org, linux-stm32@st-md-mailman.stormreply.com, linux-amarula@amarulasolutions.com, Jagan Teki , =?utf-8?q?Guido_G=C3=BCnther?= Subject: [PATCH 1/3] drm: bridge: nwl-dsi: Drop panel_bridge from nwl_dsi Date: Fri, 10 Dec 2021 23:18:17 +0530 Message-Id: <20211210174819.2250178-1-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=efryh0xR; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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: , panel_bridge pointer never used anywhere except the one it looked up at nwl_dsi_bridge_attach. Drop it from the nwl_dsi structure. Cc: Guido Günther Signed-off-by: Jagan Teki Reviewed-by: Guido Günther --- drivers/gpu/drm/bridge/nwl-dsi.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/bridge/nwl-dsi.c b/drivers/gpu/drm/bridge/nwl-dsi.c index a7389a0facfb..6becdcdc99fe 100644 --- a/drivers/gpu/drm/bridge/nwl-dsi.c +++ b/drivers/gpu/drm/bridge/nwl-dsi.c @@ -65,7 +65,6 @@ struct nwl_dsi_transfer { struct nwl_dsi { struct drm_bridge bridge; struct mipi_dsi_host dsi_host; - struct drm_bridge *panel_bridge; struct device *dev; struct phy *phy; union phy_configure_opts phy_cfg; @@ -924,13 +923,11 @@ static int nwl_dsi_bridge_attach(struct drm_bridge *bridge, if (IS_ERR(panel_bridge)) return PTR_ERR(panel_bridge); } - dsi->panel_bridge = panel_bridge; - if (!dsi->panel_bridge) + if (!panel_bridge) return -EPROBE_DEFER; - return drm_bridge_attach(bridge->encoder, dsi->panel_bridge, bridge, - flags); + return drm_bridge_attach(bridge->encoder, panel_bridge, bridge, flags); } static void nwl_dsi_bridge_detach(struct drm_bridge *bridge) From patchwork Fri Dec 10 17:48:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1808 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 4306C3F075 for ; Fri, 10 Dec 2021 18:49:09 +0100 (CET) Received: by mail-pg1-f200.google.com with SMTP id u22-20020a632356000000b003308cbcefb0sf5585223pgm.0 for ; Fri, 10 Dec 2021 09:49:09 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1639158548; cv=pass; d=google.com; s=arc-20160816; b=fUPO9v7apPdhG1kS6oUuEWFgA5Ug3kHQK2yMo8FIFRT9HIrO/cEGvUDR+O5KJrQ1U4 OAt5iIyOBJlCfWv4SHgni2pPc8+6XycVI/2ITanheRphnfXk6VQnmm6gf2kZfYB9Vay4 ae2z+dJgkGH5wKGdgbwEp7ohulvFwvovISfafo49+VBVxpHiFqN4KMLl3/qm1NrVDAgi GpfyPTBVS/MlJkR7CRC9ERAWs2tS2tVqeMmPLfXbGKjjBxUJZUtKUFuIItxMaooWBon3 QjB6Id7iZEv6zTsp2/X18POTBkdqlsQAHtHdy16MfN9D69JtigZV6LE/H3wWmRDj/H/2 ktIw== 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:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=PtKijJu5TGjyXT8DSu5kmTe46WkZxGktURvDNX9IkrA=; b=uBDuljRGsonXbPTGEB0rckR6e65snqK5eidJjrHgTzEP4pw3vPHIPqPeZgkXG2NigR FkFprVfU4O3vJtBFbg8dV3+qH2fuQrf2f/DF+tikD/sUwx0bmg8FffXBxonOr+mu9o7s n981qFIUEFLhQKS3rn04npKue4DLIbbcrRJl323qzCfFUPaI/812oDYyC77zYpygMJPu gnKJabwKwEYeyd3yn+bBhmBfN/xIvLO76qkq9Y6cO4XPx5/bcL+ddvKx5nGuK+pwN4jo QsvoHCDql2wxmeEHFr+NLpe4czZ9NDSy9poXY+PEJfFlz9TeCA9LQUive6uTIzm4mLIA gjyQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="MM1upYS/"; 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:content-transfer-encoding:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=PtKijJu5TGjyXT8DSu5kmTe46WkZxGktURvDNX9IkrA=; b=pYcuQ4dJClKhGD/70wvaUZsHgg7uMSSoq3pZQhSbyX3X91n33rOYwDzhJSVNYVHDci CUojUCJIOAUEpiH2jUdimUdLre7MeeuYpzbA2o2Bry/zTWEMlTb7TNHUF46ALvUSzEeW dIzWB2G5PTf/bn+mNBhGODSvfqoqBuTbjQNfw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding: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=PtKijJu5TGjyXT8DSu5kmTe46WkZxGktURvDNX9IkrA=; b=cQiT3syCHVovBULJAJVQUhQwua+JJ5TfxO5eeGn/n4XA/CktXvDCjYOUiSWfbS/Yw4 Hw+68k3TH43/Zg1PmqHrZrgc1hFpZglnVnUjpbZf81Pr3FFiPusZ0MTgAdknPobPvHnX l8DQ6meZEcMzqz0iroS8xmc5RRkYaDmnxsDz54rDWiMprOeDSIFWmlqZI9QMl7eTcpQ6 pE6wZ7QzZdOHGxWQ3ft3wr0vAlNh7DCDy67MLi2bq0MeQlvA3LNEsNlGt5le56c3CUZ2 WF6VqpxrWUnIH/lY/9njEpLGYheO6l0h7MJtZuuM+HAKHvJWz+fMs93hmLsR6NVWF6aV vNQQ== X-Gm-Message-State: AOAM533Q/ly8aJfZvClbKy4l/xIm/OHRIbkgw/VTbzpLi8w3mD53okE3 ULHBDScDnReDk9uxRXAFeHXH00qm X-Google-Smtp-Source: ABdhPJzh94lLJyxEjV9boFuezW1j+Z8j1Bq3+WrmHNZKeBK7dJ/a/JIVtrtyfrsWattqzVZKez43eg== X-Received: by 2002:a17:90b:4a0a:: with SMTP id kk10mr26205579pjb.198.1639158547927; Fri, 10 Dec 2021 09:49:07 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:90b:2382:: with SMTP id mr2ls4321101pjb.3.gmail; Fri, 10 Dec 2021 09:49:07 -0800 (PST) X-Received: by 2002:a17:902:ce8f:b0:141:f85a:e0de with SMTP id f15-20020a170902ce8f00b00141f85ae0demr77088196plg.69.1639158547184; Fri, 10 Dec 2021 09:49:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1639158547; cv=none; d=google.com; s=arc-20160816; b=sOiNLfRjmZLke+IiP+Vj+tVIbnXP7fs4kpRh/0Aucyc0Hm7jlzXgBHoDWiUlswK7n+ mGfqY5y1M4anpILTiXiebREk5jTALgcr3o4jnLRfgXZA/fy8Vpj09TF6inQ8r8Et12M/ zHQXfsNZVKoeLvO5tJszVkEIAS02bGSTRenyYWxpuOZXSYyTI5PsfLhJt9LwEmgUEdeR du2BU2bbNvwFsf1epZ2hcTma/pi+JqRfq3PM6SSeKtM68+KCm+XNhG8MBzL7nhf/3Jbn WLwVR3TNN+ifwBnHFPojg6cqwDBDxkC3XZYbYVS3E1m+lijBcvONUIFeKpQpSFubXmpA kewA== 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=7Nc8TwxfVSVe1wllVo9dJ3a2pGJ8q3XwPSEkE8/FYhQ=; b=F80UdSS4vCrf6oVmdRJ8yV1J+i69T9WeHlrJNQeyKPhmlDRsmGQwFRuurZ+Stjjl7V PZIdh/+cOrEWc1dfPlQ5APbuHFdh/yY00O6BFDdNC7pLT+KL3hCV99QzNb7s3bjFCWlL Q5EywqZTdRjyQDoknv1y2FdvUhuBDNxuPCx1xStn7GVZyqVSzhI2Y/32zl570EQHS5Uy THdiaDltBGnvrmJ6PPptjrhgx201Pp67dgQ08TA/bVpQgDtsE9TPhjTL7sb/D5/uTLky rtd6uyX5htts7xZ3aPIEcZefU8GYl0cyXiJj9IYpb/8WiQHHk7k1gJGS+CrNGLvwhF91 wbAw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="MM1upYS/"; 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 u15sor2982713plh.10.2021.12.10.09.49.07 for (Google Transport Security); Fri, 10 Dec 2021 09:49:07 -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:c702:b0:144:ce0e:d47 with SMTP id p2-20020a170902c70200b00144ce0e0d47mr75825180plp.69.1639158546872; Fri, 10 Dec 2021 09:49:06 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a0a9:28d6:2bae:633e:b110]) by smtp.gmail.com with ESMTPSA id w1sm4039644pfg.11.2021.12.10.09.49.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Dec 2021 09:49:06 -0800 (PST) From: Jagan Teki To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Yannick Fertre , Maxime Ripard , Sam Ravnborg , Michael Nazzareno Trimarchi Cc: dri-devel@lists.freedesktop.org, linux-stm32@st-md-mailman.stormreply.com, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH 2/3] Revert "drm/bridge: dw-mipi-dsi: Find the possible DSI devices" Date: Fri, 10 Dec 2021 23:18:18 +0530 Message-Id: <20211210174819.2250178-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211210174819.2250178-1-jagan@amarulasolutions.com> References: <20211210174819.2250178-1-jagan@amarulasolutions.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Original-Sender: jagan@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b="MM1upYS/"; spf=pass (google.com: domain of jagan@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jagan@amarulasolutions.com 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: , This reverts commit c206c7faeb3263a7cc7b4de443a3877cd7a5e74b. In order to avoid any probe ordering issues, the I2C based downstream bridge drivers now register and attach the DSI devices at the probe instead of doing it on drm_bridge_function.attach(). Examples of those commits are: commit <6ef7ee48765f> ("drm/bridge: sn65dsi83: Register and attach our DSI device at probe") commit ("drm/bridge: lt8912b: Register and attach our DSI device at probe") commit <864c49a31d6b> ("drm/bridge: adv7511: Register and attach our DSI device at probe") dw-mipi-dsi has panel or bridge finding code based on previous downstream bridges, so revert the same and make the panel or bridge funding in host attach as before. Signed-off-by: Jagan Teki --- drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 58 +++++-------------- 1 file changed, 15 insertions(+), 43 deletions(-) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c index e44e18a0112a..7900da1d4325 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c @@ -246,7 +246,6 @@ struct dw_mipi_dsi { struct clk *pclk; - bool device_found; unsigned int lane_mbps; /* per lane */ u32 channel; u32 lanes; @@ -310,37 +309,13 @@ static inline u32 dsi_read(struct dw_mipi_dsi *dsi, u32 reg) return readl(dsi->base + reg); } -static int dw_mipi_dsi_panel_or_bridge(struct dw_mipi_dsi *dsi, - struct device_node *node) -{ - struct drm_bridge *bridge; - struct drm_panel *panel; - int ret; - - ret = drm_of_find_panel_or_bridge(node, 1, 0, &panel, &bridge); - if (ret) - return ret; - - if (panel) { - bridge = drm_panel_bridge_add_typed(panel, - DRM_MODE_CONNECTOR_DSI); - if (IS_ERR(bridge)) - return PTR_ERR(bridge); - } - - dsi->panel_bridge = bridge; - - if (!dsi->panel_bridge) - return -EPROBE_DEFER; - - return 0; -} - static int dw_mipi_dsi_host_attach(struct mipi_dsi_host *host, struct mipi_dsi_device *device) { struct dw_mipi_dsi *dsi = host_to_dsi(host); const struct dw_mipi_dsi_plat_data *pdata = dsi->plat_data; + struct drm_bridge *bridge; + struct drm_panel *panel; int ret; if (device->lanes > dsi->plat_data->max_data_lanes) { @@ -354,14 +329,22 @@ static int dw_mipi_dsi_host_attach(struct mipi_dsi_host *host, dsi->format = device->format; dsi->mode_flags = device->mode_flags; - if (!dsi->device_found) { - ret = dw_mipi_dsi_panel_or_bridge(dsi, host->dev->of_node); - if (ret) - return ret; + ret = drm_of_find_panel_or_bridge(host->dev->of_node, 1, 0, + &panel, &bridge); + if (ret) + return ret; - dsi->device_found = true; + if (panel) { + bridge = drm_panel_bridge_add_typed(panel, + DRM_MODE_CONNECTOR_DSI); + if (IS_ERR(bridge)) + return PTR_ERR(bridge); } + dsi->panel_bridge = bridge; + + drm_bridge_add(&dsi->bridge); + if (pdata->host_ops && pdata->host_ops->attach) { ret = pdata->host_ops->attach(pdata->priv_data, device); if (ret < 0) @@ -1016,16 +999,6 @@ static int dw_mipi_dsi_bridge_attach(struct drm_bridge *bridge, /* Set the encoder type as caller does not know it */ bridge->encoder->encoder_type = DRM_MODE_ENCODER_DSI; - if (!dsi->device_found) { - int ret; - - ret = dw_mipi_dsi_panel_or_bridge(dsi, dsi->dev->of_node); - if (ret) - return ret; - - dsi->device_found = true; - } - /* Attach the panel-bridge to the dsi bridge */ return drm_bridge_attach(bridge->encoder, dsi->panel_bridge, bridge, flags); @@ -1208,7 +1181,6 @@ __dw_mipi_dsi_probe(struct platform_device *pdev, #ifdef CONFIG_OF dsi->bridge.of_node = pdev->dev.of_node; #endif - drm_bridge_add(&dsi->bridge); return dsi; } From patchwork Fri Dec 10 17:48:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1809 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f200.google.com (mail-pf1-f200.google.com [209.85.210.200]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id A3D383F075 for ; Fri, 10 Dec 2021 18:49:16 +0100 (CET) Received: by mail-pf1-f200.google.com with SMTP id e7-20020aa798c7000000b004a254db7946sf6060312pfm.17 for ; Fri, 10 Dec 2021 09:49:16 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1639158555; cv=pass; d=google.com; s=arc-20160816; b=cbJfLqGZ/T+MpX81aSDbM3vxWxbdDnyo2rlRUOdJHT6Si3RNfVWUN3Ooos5YEXpTAu 44CvdXigp1qiNljkDDNaD0C+gkNuKeLQ00utWrdJ06HOiVEkBlr3TTn4v/8FIU8AQUKS iubzW9pt077kOpvqSfoeWaw2K139shq1Rz29aub+nHOgY3rhRAAyVjc1gxlJWTPB6Wf0 yUAKiYWJ+FwWKj4eB/vOX15XlPIbZ7HvcAGUJM+feovHqshPvsIIHLZdOYQKqpQ+1kQy b8PPHEdn4WY9oQP2n1u2+guweQSzhTHNFZJ+hhRoyssWxScKbLIFW5+A69jLP+1Cd7Gq jzKw== 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=3r1K84hPFgUDZRsxJ4zJyAJ0YQawq28FiKeJ/XI+jBo=; b=MYDC9lvxMu+UtnyvGHk9RQB5QlwgDqMjLuI1yor3WmbOQJ2xS9XlXstIlF/rRQX6ai d4+EEUp4VW4Y2hTQyZwW2ylpNseetDPvSALUD2U0HVp+kdGv+cIHa97LCMH6dFxkbNF5 F1bQjJiDRxw+V0UWpm8tZdJ4Y/LudblzjMNOOPqj6MWPJyp+dv28TLGxfjZ19taGOA8W c2DLXrS6++F8M4XmYjwxuX8J68HKriuiyxGRQCXC/zC7sU1pJ3pdS/++LoPu3O0onw4C +NGQl5ESXVDYehtwWrS+FKv7GXazMWmsICVYU82zVKlmXgmWK4Nlk5gWLKQpskCnQj2L VwbQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=lQzcmxEq; 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=3r1K84hPFgUDZRsxJ4zJyAJ0YQawq28FiKeJ/XI+jBo=; b=hEBkFCcCcucscmahE35SA9daBY//lwvb0XADtYQNf/ZjfFMbRUI6cvej/JG4iVsZtU K1Rwc74cwAnuBSFFE+dYOeOtB+YQ8IjCLAIUU32whshiYgIOSRtG5m2hbpp9py0H+B2B SVYZN5pPEcZB8O+VwTv6zOhPmwrVd0sYLlHCw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=3r1K84hPFgUDZRsxJ4zJyAJ0YQawq28FiKeJ/XI+jBo=; b=1JUlSp4qJgl8TvU2iluG5oWWyZujl4KY8q0CBJqTE51fbY6X5OsPZRoZfkxfANUDnw 3hemk5VYneeMf8QZrhLxYQBVic5U9jwmLszDOu4mJa4tgnguZpIsVwskTvqpMGdUex+i 7f+52fxUgVuSv/d/RWmOIp3PRBTGfD5pIP1lGgEV9HcLtqnpo+oN1aIBStOtuEpUPZ0F 4q7gz3u16ZVRT82yQ0BNWDlUJnDzlN50W6OvhelCgH4Q9XSW9hT70gNQ3gEETeqyjtG5 +xdlpe7MLL91JMBuiugnnu/X6jFdWRsAzgjUh3cXCEjVFd5372m4Entbl6tzRMkylcZJ gr4w== X-Gm-Message-State: AOAM53171wY88LbK6/FHujPM1phHCYqFEwtPjvGIJ2uu5IjhFOhHT9ra 7zFKOZPFjB4bBDaUbTCSUC3vBYo5 X-Google-Smtp-Source: ABdhPJwBBps0Ozii/Fz00oSYncwnmNaYWkHPx4cnF7lmmz/9VQcwlFY7mCj5n7Zq9BeX+t5pEE/aBg== X-Received: by 2002:a62:6dc2:0:b0:4af:98e:1d3b with SMTP id i185-20020a626dc2000000b004af098e1d3bmr19211009pfc.52.1639158555250; Fri, 10 Dec 2021 09:49:15 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:6a00:15cb:: with SMTP id o11ls3597698pfu.9.gmail; Fri, 10 Dec 2021 09:49:14 -0800 (PST) X-Received: by 2002:a05:6a00:23c8:b0:49f:e054:84d7 with SMTP id g8-20020a056a0023c800b0049fe05484d7mr19426005pfc.50.1639158554465; Fri, 10 Dec 2021 09:49:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1639158554; cv=none; d=google.com; s=arc-20160816; b=Jo99C1nQR/SdWEcuKd/3b4bcsWyT99gSybFfS18nojF4k8A6N4dLtZgAK/DbxuigEm hUDNTrX7FMYr8QVpNXPk8ccGPoFwUVW9yQRoD1wsXq0HO72+JsbxzLbb54M6F3uRo2Eh jGsZIe2qKqAqcbDMQn+YhejtX/nkJks1DtvHKKt1F75Vr41cUFwZJS7s0hGXSA21nyGn EMuG0QG/IVZy5dqggInt0wZea1I/2QdP72RFPiC4OE1HeAFpc2rXCjrMhhR/m27n3okU pBCLFz1DioZSMn2pXHmhQ6hwkfjLpwNx0LI4L5rctfFBxb/diuWAn4aTYRBOKxSaE/NT 3dTQ== 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=/0452zXAT4kPvtxYy8MYfb9PCgWUx3+xujH6gdkFnig=; b=BSQv02sHLrXcZpDkZXFmcK84O6LamRRGfKuP8tTcNBorVMmBu07SsADe+WI5t7igSe /+KPJmrZD9EI+fSXrnzIce7XM9GKrEbHTJnc8LCKd7wAf/Jg8yDJ2IFqljM9XoxXYhes ttse8bCd8WVm1+O8hC4rIfp7R+XR8L5BdS85t4Rp6TVzXXiQBYDaPaX40hITfYdWlYMB +8lgiJS3jjOCGeWWWJ4GLEYUfoauwA6hz+yLES1l6vQkNCV40OBn2dLsIGUvm5A7rT7n c20g5AE6RiF4I9zXtIpVqsnzTLdHU6/VvxiL41eyNakKAgnQh8k7vlipvC6xMutZUCXw 20zQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=lQzcmxEq; 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 oc13sor3049913pjb.7.2021.12.10.09.49.14 for (Google Transport Security); Fri, 10 Dec 2021 09:49:14 -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:90a:c506:: with SMTP id k6mr25968773pjt.74.1639158554132; Fri, 10 Dec 2021 09:49:14 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a0a9:28d6:2bae:633e:b110]) by smtp.gmail.com with ESMTPSA id w1sm4039644pfg.11.2021.12.10.09.49.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Dec 2021 09:49:13 -0800 (PST) From: Jagan Teki To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Yannick Fertre , Maxime Ripard , Sam Ravnborg , Michael Nazzareno Trimarchi Cc: dri-devel@lists.freedesktop.org, linux-stm32@st-md-mailman.stormreply.com, linux-amarula@amarulasolutions.com, Jagan Teki , Philipp Zabel , Chun-Kuang Hu , Linus Walleij Subject: [PATCH 3/3] drm: bridge: Switch to devm_drm_of_get_bridge Date: Fri, 10 Dec 2021 23:18:19 +0530 Message-Id: <20211210174819.2250178-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211210174819.2250178-1-jagan@amarulasolutions.com> References: <20211210174819.2250178-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=lQzcmxEq; 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: , devm_drm_of_get_bridge is capable of looking up the downstream bridge and panel and trying to add a panel bridge if the panel is found. Replace explicit finding calls with devm_drm_of_get_bridge. Cc: Philipp Zabel Cc: Chun-Kuang Hu Cc: Linus Walleij Signed-off-by: Jagan Teki --- Note: for mcde_dsi child lookups has dependecy with https://patchwork.kernel.org/project/dri-devel/cover/20211207054747.461029-1-jagan@amarulasolutions.com/ drivers/gpu/drm/bridge/analogix/anx7625.c | 13 +------ drivers/gpu/drm/bridge/chipone-icn6211.c | 7 +--- drivers/gpu/drm/bridge/nwl-dsi.c | 18 ++------- drivers/gpu/drm/bridge/nxp-ptn3460.c | 7 +--- drivers/gpu/drm/bridge/parade-ps8622.c | 7 +--- drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 15 ++----- drivers/gpu/drm/mcde/mcde_dsi.c | 39 +++---------------- drivers/gpu/drm/mediatek/mtk_dsi.c | 14 ++----- 8 files changed, 18 insertions(+), 102 deletions(-) diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c index 001fb39d9919..065cc3b041dd 100644 --- a/drivers/gpu/drm/bridge/analogix/anx7625.c +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c @@ -1333,8 +1333,6 @@ static int anx7625_parse_dt(struct device *dev, struct anx7625_platform_data *pdata) { struct device_node *np = dev->of_node, *ep0; - struct drm_panel *panel; - int ret; int bus_type, mipi_lanes; anx7625_get_swing_setting(dev, pdata); @@ -1371,16 +1369,7 @@ static int anx7625_parse_dt(struct device *dev, if (of_property_read_bool(np, "analogix,audio-enable")) pdata->audio_en = 1; - ret = drm_of_find_panel_or_bridge(np, 1, 0, &panel, NULL); - if (ret < 0) { - if (ret == -ENODEV) - return 0; - return ret; - } - if (!panel) - return -ENODEV; - - pdata->panel_bridge = devm_drm_panel_bridge_add(dev, panel); + pdata->panel_bridge = devm_drm_of_get_bridge(dev, dev->of_node, 1, 0); if (IS_ERR(pdata->panel_bridge)) return PTR_ERR(pdata->panel_bridge); DRM_DEV_DEBUG_DRIVER(dev, "get panel node.\n"); diff --git a/drivers/gpu/drm/bridge/chipone-icn6211.c b/drivers/gpu/drm/bridge/chipone-icn6211.c index a6151db95586..23c34039ac48 100644 --- a/drivers/gpu/drm/bridge/chipone-icn6211.c +++ b/drivers/gpu/drm/bridge/chipone-icn6211.c @@ -178,7 +178,6 @@ static const struct drm_bridge_funcs chipone_bridge_funcs = { static int chipone_parse_dt(struct chipone *icn) { struct device *dev = icn->dev; - struct drm_panel *panel; int ret; icn->vdd1 = devm_regulator_get_optional(dev, "vdd1"); @@ -214,11 +213,7 @@ static int chipone_parse_dt(struct chipone *icn) return PTR_ERR(icn->enable_gpio); } - ret = drm_of_find_panel_or_bridge(dev->of_node, 1, 0, &panel, NULL); - if (ret) - return ret; - - icn->panel_bridge = devm_drm_panel_bridge_add(dev, panel); + icn->panel_bridge = devm_drm_of_get_bridge(dev, dev->of_node, 1, 0); if (IS_ERR(icn->panel_bridge)) return PTR_ERR(icn->panel_bridge); diff --git a/drivers/gpu/drm/bridge/nwl-dsi.c b/drivers/gpu/drm/bridge/nwl-dsi.c index 6becdcdc99fe..f6859dfa6d36 100644 --- a/drivers/gpu/drm/bridge/nwl-dsi.c +++ b/drivers/gpu/drm/bridge/nwl-dsi.c @@ -910,22 +910,10 @@ static int nwl_dsi_bridge_attach(struct drm_bridge *bridge, { struct nwl_dsi *dsi = bridge_to_dsi(bridge); struct drm_bridge *panel_bridge; - struct drm_panel *panel; - int ret; - - ret = drm_of_find_panel_or_bridge(dsi->dev->of_node, 1, 0, &panel, - &panel_bridge); - if (ret) - return ret; - - if (panel) { - panel_bridge = drm_panel_bridge_add(panel); - if (IS_ERR(panel_bridge)) - return PTR_ERR(panel_bridge); - } - if (!panel_bridge) - return -EPROBE_DEFER; + panel_bridge = devm_drm_of_get_bridge(dsi->dev, dsi->dev->of_node, 1, 0); + if (IS_ERR(panel_bridge)) + return PTR_ERR(panel_bridge); return drm_bridge_attach(bridge->encoder, panel_bridge, bridge, flags); } diff --git a/drivers/gpu/drm/bridge/nxp-ptn3460.c b/drivers/gpu/drm/bridge/nxp-ptn3460.c index e941c1132598..1ab91f4e057b 100644 --- a/drivers/gpu/drm/bridge/nxp-ptn3460.c +++ b/drivers/gpu/drm/bridge/nxp-ptn3460.c @@ -263,7 +263,6 @@ static int ptn3460_probe(struct i2c_client *client, struct device *dev = &client->dev; struct ptn3460_bridge *ptn_bridge; struct drm_bridge *panel_bridge; - struct drm_panel *panel; int ret; ptn_bridge = devm_kzalloc(dev, sizeof(*ptn_bridge), GFP_KERNEL); @@ -271,11 +270,7 @@ static int ptn3460_probe(struct i2c_client *client, return -ENOMEM; } - ret = drm_of_find_panel_or_bridge(dev->of_node, 0, 0, &panel, NULL); - if (ret) - return ret; - - panel_bridge = devm_drm_panel_bridge_add(dev, panel); + panel_bridge = devm_drm_of_get_bridge(dev, dev->of_node, 0, 0); if (IS_ERR(panel_bridge)) return PTR_ERR(panel_bridge); diff --git a/drivers/gpu/drm/bridge/parade-ps8622.c b/drivers/gpu/drm/bridge/parade-ps8622.c index 614b19f0f1b7..37b308850b4e 100644 --- a/drivers/gpu/drm/bridge/parade-ps8622.c +++ b/drivers/gpu/drm/bridge/parade-ps8622.c @@ -452,18 +452,13 @@ static int ps8622_probe(struct i2c_client *client, struct device *dev = &client->dev; struct ps8622_bridge *ps8622; struct drm_bridge *panel_bridge; - struct drm_panel *panel; int ret; ps8622 = devm_kzalloc(dev, sizeof(*ps8622), GFP_KERNEL); if (!ps8622) return -ENOMEM; - ret = drm_of_find_panel_or_bridge(dev->of_node, 0, 0, &panel, NULL); - if (ret) - return ret; - - panel_bridge = devm_drm_panel_bridge_add(dev, panel); + panel_bridge = devm_drm_of_get_bridge(dev, dev->of_node, 0, 0); if (IS_ERR(panel_bridge)) return PTR_ERR(panel_bridge); diff --git a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c index 7900da1d4325..eafd1e5e6852 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c @@ -315,7 +315,6 @@ static int dw_mipi_dsi_host_attach(struct mipi_dsi_host *host, struct dw_mipi_dsi *dsi = host_to_dsi(host); const struct dw_mipi_dsi_plat_data *pdata = dsi->plat_data; struct drm_bridge *bridge; - struct drm_panel *panel; int ret; if (device->lanes > dsi->plat_data->max_data_lanes) { @@ -329,17 +328,9 @@ static int dw_mipi_dsi_host_attach(struct mipi_dsi_host *host, dsi->format = device->format; dsi->mode_flags = device->mode_flags; - ret = drm_of_find_panel_or_bridge(host->dev->of_node, 1, 0, - &panel, &bridge); - if (ret) - return ret; - - if (panel) { - bridge = drm_panel_bridge_add_typed(panel, - DRM_MODE_CONNECTOR_DSI); - if (IS_ERR(bridge)) - return PTR_ERR(bridge); - } + bridge = devm_drm_of_get_bridge(dsi->dev, dsi->dev->of_node, 1, 0); + if (IS_ERR(bridge)) + return PTR_ERR(bridge); dsi->panel_bridge = bridge; diff --git a/drivers/gpu/drm/mcde/mcde_dsi.c b/drivers/gpu/drm/mcde/mcde_dsi.c index 5651734ce977..9371349b8b25 100644 --- a/drivers/gpu/drm/mcde/mcde_dsi.c +++ b/drivers/gpu/drm/mcde/mcde_dsi.c @@ -1073,9 +1073,7 @@ static int mcde_dsi_bind(struct device *dev, struct device *master, struct drm_device *drm = data; struct mcde *mcde = to_mcde(drm); struct mcde_dsi *d = dev_get_drvdata(dev); - struct device_node *child; - struct drm_panel *panel = NULL; - struct drm_bridge *bridge = NULL; + struct drm_bridge *bridge; if (!of_get_available_child_count(dev->of_node)) { dev_info(dev, "unused DSI interface\n"); @@ -1100,37 +1098,10 @@ static int mcde_dsi_bind(struct device *dev, struct device *master, return PTR_ERR(d->lp_clk); } - /* Look for a panel as a child to this node */ - for_each_available_child_of_node(dev->of_node, child) { - panel = of_drm_find_panel(child); - if (IS_ERR(panel)) { - dev_err(dev, "failed to find panel try bridge (%ld)\n", - PTR_ERR(panel)); - panel = NULL; - - bridge = of_drm_find_bridge(child); - if (!bridge) { - dev_err(dev, "failed to find bridge\n"); - return -EINVAL; - } - } - } - if (panel) { - bridge = drm_panel_bridge_add_typed(panel, - DRM_MODE_CONNECTOR_DSI); - if (IS_ERR(bridge)) { - dev_err(dev, "error adding panel bridge\n"); - return PTR_ERR(bridge); - } - dev_info(dev, "connected to panel\n"); - d->panel = panel; - } else if (bridge) { - /* TODO: AV8100 HDMI encoder goes here for example */ - dev_info(dev, "connected to non-panel bridge (unsupported)\n"); - return -ENODEV; - } else { - dev_err(dev, "no panel or bridge\n"); - return -ENODEV; + bridge = devm_drm_of_get_bridge(dev, dev->of_node, 0, 0); + if (IS_ERR(bridge)) { + dev_err(dev, "error to get bridge\n"); + return PTR_ERR(bridge); } d->bridge_out = bridge; diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c index 5d90d2eb0019..a1b3e1f4b497 100644 --- a/drivers/gpu/drm/mediatek/mtk_dsi.c +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c @@ -1004,7 +1004,6 @@ static int mtk_dsi_probe(struct platform_device *pdev) { struct mtk_dsi *dsi; struct device *dev = &pdev->dev; - struct drm_panel *panel; struct resource *regs; int irq_num; int ret; @@ -1021,17 +1020,10 @@ static int mtk_dsi_probe(struct platform_device *pdev) return ret; } - ret = drm_of_find_panel_or_bridge(dev->of_node, 0, 0, - &panel, &dsi->next_bridge); - if (ret) + dsi->next_bridge = devm_drm_of_get_bridge(dev, dev->of_node, 0, 0); + if (IS_ERR(dsi->next_bridge)) { + ret = PTR_ERR(dsi->next_bridge); goto err_unregister_host; - - if (panel) { - dsi->next_bridge = devm_drm_panel_bridge_add(dev, panel); - if (IS_ERR(dsi->next_bridge)) { - ret = PTR_ERR(dsi->next_bridge); - goto err_unregister_host; - } } dsi->driver_data = of_device_get_match_data(dev);