From patchwork Thu Mar 31 15:44:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1894 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id F3EDA3F0D7 for ; Thu, 31 Mar 2022 17:45:21 +0200 (CEST) Received: by mail-pl1-f197.google.com with SMTP id s5-20020a170902b18500b00155d6fbf4d4sf6555823plr.18 for ; Thu, 31 Mar 2022 08:45:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1648741520; cv=pass; d=google.com; s=arc-20160816; b=bO2vxu3qAz4ApkZwup0ObfUM5x04tuJfUpmQgOMVqzrn6Gzbb6GU1vwIyIEfpfATqD Mvc9i0QtjB6TMetAEnSWVLnBCqron5k0s83BgAsJFv50HSZYuMOjoU0LBnETM5zg1wBa 93KQCqMGzeKPZ6929Gf14xl7oi46c5xiVHO5vXU0l0pQCeDY7GImyaFUcHIoLS+fm1Pg aA8HdAdi4BsB+NoXMymSnhGlyJpzLj45YyJABTnrqtiOU5CjDPFbUFVDOFKo9UuaqIdy DWqDYI6CwZAolLtQP3Mt+WgERDY1gxXjcMTNLAAmA9bw7dsGz6rcSpK+RvEor9vkIpkC pRLg== 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=FfwcbhxSYzUndtzznqk3lZMPY3APqhpaOLKCHaenCjU=; b=M7QDMUJOCp0/KwE2eBrgntbz8dE/BisVQkZciWcF33DOwLN2RPaD+EYFbd5pIpZlOF WPWXxG3O9gIH2lOEfE3CVRLJkAA1b4QUQSkpuou0MNprT0reGhgMBRLF4szQ9zqC/Hpp pPAtH7CRocVbmDBRqMi0A1CuR6ZjkEBLd5QVfrelZXSeJJ5/ssg38cRuMlKKMZaW9on1 ie6O3ieVnG9TRG11jloZWhx+TXh4+/gqDkqhEIXdrsARZDbx+tvB8iij3YPMNi7BThR+ IWmgG9flDmo4pestZuvLu5W7mgN4VbIRMH0QKdp/nbj/R2zrmGlgtEK+5p/XYwC0jNwY hfnw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ke7OiYmn; 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=FfwcbhxSYzUndtzznqk3lZMPY3APqhpaOLKCHaenCjU=; b=XLzheuBdSbidP+6PcrKwohP6dlDuQohD80J11BPrw527aElRLHjmEIwfOuG2G1yNU3 v90gA5ESIomvU8gOqWUWKiRlmTP/GUfB9IaJbsS47lCik87KiwF5MlHML461o+6YZQz+ 0vKwvY0kCMddC9AihCRrVuDBdZsxtrm/RqaCw= 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=FfwcbhxSYzUndtzznqk3lZMPY3APqhpaOLKCHaenCjU=; b=3xrRAO0EeyfWGaEilRFQ8IMYNv36Ks255T5gyvxqeozoTQulz9RJoO4wfldSVPV3+g bH5FuIzM+xBzs08NfaehzpbMVRPaQ0qznQfahH9M3MnUZIDRs3P4R+PSD8b6MLJPWv3V 9/9yIaGdjRxIfucDmA/agd+64Ya98SYML39OY0q7nLTIn8jk+rbqAPbhCsSLPOLw/MQ1 B97Y88HNMLGuGdRRKc3qsNArjAZ+VNWJlOn0KKPCi9lkoUArGnbav/V8vGZUTTg4ZIk7 HcKUBfxwuoauFjzoTfNqL3i9TKtst8BGQnQIi22E6t9CgEFx6Nbz5JpQaQ8DsxE69cVo Rz0Q== X-Gm-Message-State: AOAM531Mj6wUPqIVuJKvt2WCi8boFLWMxTGhsIaHXfecpGgyyW2CIlIu +dSefIRGBZbTybL9SzB5DYM+xAqU X-Google-Smtp-Source: ABdhPJwipY2fzSEJCO2Z21M2QOrAsy4+xb/z/vG0sxrp3Q1LWmw+HGYC3KfsVa4JVwToe9Tiq6WqtQ== X-Received: by 2002:a17:90a:c246:b0:1c9:7d32:640f with SMTP id d6-20020a17090ac24600b001c97d32640fmr6863772pjx.182.1648741520638; Thu, 31 Mar 2022 08:45:20 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:bb8c:b0:14d:d65a:dbdb with SMTP id m12-20020a170902bb8c00b0014dd65adbdbls4665036pls.6.gmail; Thu, 31 Mar 2022 08:45:20 -0700 (PDT) X-Received: by 2002:a17:902:f54d:b0:154:6794:ab38 with SMTP id h13-20020a170902f54d00b001546794ab38mr5846626plf.114.1648741519776; Thu, 31 Mar 2022 08:45:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648741519; cv=none; d=google.com; s=arc-20160816; b=rn2szIpq01hwr5dMzxda+GrPL0GI1iIFVqjKP01+R8TqJs2RvjgTQPnizOV5TQnLm5 zA9oFfd8vcgDUkTZhHqUSdfTvccmwGfD3TfLOh/VpFsuKNjnjm1wscF47WF+A9nnOd7T WU0Zvom4ixhUVfty50PF9IbSOX4KhtiL1QRN7/vYeB++R98qjUPJ4J76X0AsBl7pBmhN bFqq4AZI7tSZsc25BA6UPI6c75ewHK5ywmXSNvBYgmR/Hm56V0xl+tbo0oGVoysHe0Zc NEuNMPERPxf1Cf1R6/b7h1thH/eltHZbd8amB+7s+10xZn+cJh4ALqvBCuMlzwLyIhMD 2xWw== 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=p4j3Qt6w8Esn9msyNRh1aWfBBelNHCS4Qddf02urjTE=; b=pZcS6ZQHrqebhhHEO1RvLjprxaTzDKrqV2RCquDvc1j/5Xer3eWbWC8hmHrLGrXZKq GBSxt3kVPR3DAGZ8ShKnnyYcm4SKBEVbhrfTtPJa6CCWllt3c5DKWltjEitkEYcBMB58 AYLtv82jGEbM4j4bbxHWu4zwyH9iYlsruXcbe+wnhcA4S6glaFvhRsybxBrd6L0RWPiS 14xPX08uLcnhheQ1tPXxqVKCxeF57v1IVHm4GBB+2u4O4QgMgy8azuvCrtctXvbGXfTT 3tBbVs2ssUa+3KiLji3tUM6Q2vrui0Rwny13g/XPfeZRBgiaiJC19zDPTqrqE4Trf4tI 6VpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ke7OiYmn; 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 h4-20020a636c04000000b003983e505d3dsor6135188pgc.66.2022.03.31.08.45.19 for (Google Transport Security); Thu, 31 Mar 2022 08:45:19 -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:a63:c015:0:b0:385:fe06:eb86 with SMTP id h21-20020a63c015000000b00385fe06eb86mr6426559pgg.132.1648741519413; Thu, 31 Mar 2022 08:45:19 -0700 (PDT) Received: from localhost.localdomain ([183.83.137.38]) by smtp.gmail.com with ESMTPSA id g1-20020a17090adac100b001c67cedd84esm10205684pjx.42.2022.03.31.08.45.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Mar 2022 08:45:18 -0700 (PDT) From: Jagan Teki To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart Cc: Sam Ravnborg , dri-devel@lists.freedesktop.org, linux-amarula@amarulasolutions.com, Jagan Teki Subject: [PATCH v4 1/5] Revert "drm/bridge: dw-mipi-dsi: Find the possible DSI devices" Date: Thu, 31 Mar 2022 21:14:59 +0530 Message-Id: <20220331154503.66054-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=ke7OiYmn; 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 Reviewed-by: Robert Foss --- Changes for v4, v3, v2: - none 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 11d20b8638cd..1cc912b6e1f8 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) @@ -1021,16 +1004,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); @@ -1217,7 +1190,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 Thu Mar 31 15:45:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1895 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-pf1-f198.google.com (mail-pf1-f198.google.com [209.85.210.198]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 232C43F0D7 for ; Thu, 31 Mar 2022 17:45:28 +0200 (CEST) Received: by mail-pf1-f198.google.com with SMTP id y26-20020aa793da000000b004fb7c6f5d10sf5929326pff.1 for ; Thu, 31 Mar 2022 08:45:28 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1648741527; cv=pass; d=google.com; s=arc-20160816; b=qK/zdRZRTZGhRtwJZ3k4bkbn14aztp2VdHKnUaW6qKd+Im8tKx/3pW2RgWsrRXjnL0 CR1kP4jmuGulE1sfy0gniFQcNnzCVBIFDVTbO0UDi8iRq3H9jSj9nWshhoAgln5+c0dx Nty/UE4FPBZZYXu7WVupy8N0DARarEw9OmfExZ7rowxBXJxfmGZh/vToZ6jYtYuKJWJK CUB5719KypgG04pjFgLqLWi9pPn6oKHZcbnCIfyqTTx93t1D0W/TVSr50ZFboIbFTyP5 D3Mn+lHzJ9krzj4GBoKCvhXKAYj6OoBwF0aAijgQjTZ80ausnUJS1/rKJPKnp0is5rp/ 0aHA== 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=sTxeUVemDQoEBlqktiyZG81+l07S/XaqgBeh8r20w+g=; b=OjnU1wdaakY4sYyMIhj8OukFreExFDtifPt6DGYC9mZwr3cJ/srT7tI8C7yr7ejr7s Ox2DxaTP8rJO1RyG6Bnb3R7pOelKhqdrSpvvfaTr/b8etpsYNn1HYeGal6NVO0F0zG/k TVSQXG8XNLqDk4EAE18uAnDPhIt6i1AQN6kPxsJu2MXBRaYx2GXCiExyFh2jh2/NuM/z VVyDgcCyfDydjdJFZZ+T9eyvleNlwEI45p3YglBei9CU+mSxpJfnF7heCYwC0eQ2y/wD SZK6+/KN4JL6sCpVxBrSQFMzlO1f2HhND3aSDMteOjBnH86+tUyuj7LXwlO3WMKOQ23z htTA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kLrfcWHX; 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=sTxeUVemDQoEBlqktiyZG81+l07S/XaqgBeh8r20w+g=; b=SPykf9hd7yqFu837gdgHanP2B2WxYAtJQV95W5/37TA61XaWLSCV0sYMjO27n8HGtk 7TXCEaWZTKWXuC9l7026AjRseiJAFMOnJUVeVhZPQ+m0/JLFDzNKpIFfvqRiTHjvahFn 7abpLusHVry+H3yFg+1ecdFe2er/VlT+XfBPA= 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=sTxeUVemDQoEBlqktiyZG81+l07S/XaqgBeh8r20w+g=; b=pJWf61TQt9SKjUWDIo/ovCz2ZXkARbaA/woFBFycuufEiiGZvplD+D9kpfage0LPSz bMNGRRRc47hyWuPgFX3PrvAybuzellLKVee7u4pudB1HewO1TDh2OsYxz0YgehkCOYwv fEJ/PJ/LW598fOMr3Btr3Pq69YDd/F9rcKRadLcotdQqZORYERos40wDO87qpXUqX51+ +2bOLq4qFAObb/4pbF7oVyyi9KQBlVWpbBVSl1DHxvn6shruSvarvxg5pwUBfmbQ6UGz CMvdQXN1/zIPSQsAkFGc66ZDeG4eqs8PpYykSRocRtXkLUj3aYae2vpUTiaQ7fDNQDbs S8Vg== X-Gm-Message-State: AOAM530EG24XoA+yzCjs5xWUGnfulaCc8s66und9cmyp1X3uR4gVB07h XRHvk3oVenxVb6RK+RbFViL7iOtd X-Google-Smtp-Source: ABdhPJxkOt6xYZn6RDfNU5QGgYOWsr1+lItJq4un2CO30FT7UhLmjIeTsGvsV6gZkVNk894F/5hs/Q== X-Received: by 2002:a17:90b:30ca:b0:1c9:a577:5e8c with SMTP id hi10-20020a17090b30ca00b001c9a5775e8cmr6895449pjb.227.1648741526824; Thu, 31 Mar 2022 08:45:26 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a63:fd0e:0:b0:380:5398:a9ad with SMTP id d14-20020a63fd0e000000b003805398a9adls2390401pgh.7.gmail; Thu, 31 Mar 2022 08:45:24 -0700 (PDT) X-Received: by 2002:a63:5926:0:b0:398:b425:b527 with SMTP id n38-20020a635926000000b00398b425b527mr5988007pgb.396.1648741524458; Thu, 31 Mar 2022 08:45:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648741524; cv=none; d=google.com; s=arc-20160816; b=YGOFfw5M6AFfeJX7tko/dj6FJtJwABkAls9kJ/6PBQ79mSYlO1Hs+gm5HWFPWHA6K0 X9TLvqrvmYGl8JIhXfNKCMOEyKfpWl+hTKef9HIz7RVLMpEKOPNUDoC8OEKYdjj45eOZ EL22bbkjulj86LybE3v6btKiy288IYxSWlFzGRCQpy+xp8cEO9JZHrcKvvaNCYzeA0bE OcUFObguYOHi2qzN4sZxZcp/i3DEGD4KISl70xEoqBP17oiXh8zu3YYLnEwdx+J+x7JB xo4MczlPTQr7qbYxSFtZbas1/mqq1FjT+epZJKwDJCjgukw0M75vnjfANpxKcTHNnw10 Z43Q== 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=WMNo4jcJRuN6F5QK69tzr2gZgbW3m/XsCs0EXVccMtM=; b=c4OKrp02tozEj3RgDfKNkbZ82hytsSal172Cd3bJNeg+zMOC+skAx+AVtCgnHNmgRT vr6yfIT4NZBrUQMeY0EegSzr4SjgJGiqvPikWNXsT4NB1EDyqmihNQaRXA9ZX1tCdk54 sP+pjWhBgoRO1i6aweJxbWzhZTLAvXvSdMjiGUSKy1YphBAGd6PUf/7pNFe7JRfMgtJP bDREPeyaKk69sPSCnqjxJiCOURxz8Jm3B1apsSOk3OUQsvaStfS6XgwKrOS5mN97zhBv ES8I1IP2Vk34Mv4B4T3Qg6BMe6uCp8CfIiyaFbuYB6SmPMZemhfF7GRHfYI0NZ9h1dUn uBYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=kLrfcWHX; 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 ct23-20020a056a000f9700b004fa9090017bsor10204614pfb.87.2022.03.31.08.45.24 for (Google Transport Security); Thu, 31 Mar 2022 08:45:24 -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:a05:6a00:1903:b0:4fa:fa9e:42e6 with SMTP id y3-20020a056a00190300b004fafa9e42e6mr6210035pfi.1.1648741524152; Thu, 31 Mar 2022 08:45:24 -0700 (PDT) Received: from localhost.localdomain ([183.83.137.38]) by smtp.gmail.com with ESMTPSA id g1-20020a17090adac100b001c67cedd84esm10205684pjx.42.2022.03.31.08.45.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Mar 2022 08:45:23 -0700 (PDT) From: Jagan Teki To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart Cc: Sam Ravnborg , dri-devel@lists.freedesktop.org, linux-amarula@amarulasolutions.com, Jagan Teki , =?utf-8?q?Guido_G=C3=BCnther?= Subject: [PATCH v4 2/5] drm: bridge: nwl-dsi: Switch to devm_drm_of_get_bridge Date: Thu, 31 Mar 2022 21:15:00 +0530 Message-Id: <20220331154503.66054-2-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220331154503.66054-1-jagan@amarulasolutions.com> References: <20220331154503.66054-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=kLrfcWHX; 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: , 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. Reviewed-by: Guido Günther Signed-off-by: Jagan Teki --- Changes for v4: - none Changes for v3: - drop panel.h - collect Guido r-b Changes for v2: - split the patch drivers/gpu/drm/bridge/nwl-dsi.c | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/bridge/nwl-dsi.c b/drivers/gpu/drm/bridge/nwl-dsi.c index e34fb09b90b9..a549da5b3f93 100644 --- a/drivers/gpu/drm/bridge/nwl-dsi.c +++ b/drivers/gpu/drm/bridge/nwl-dsi.c @@ -25,7 +25,6 @@ #include #include #include -#include #include #include