From patchwork Tue Mar 1 14:12:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 1848 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 AFF903F0D5 for ; Tue, 1 Mar 2022 15:13:13 +0100 (CET) Received: by mail-pf1-f200.google.com with SMTP id v127-20020a622f85000000b004f3dfd386e8sf6880008pfv.16 for ; Tue, 01 Mar 2022 06:13:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1646143992; cv=pass; d=google.com; s=arc-20160816; b=M4eZ6y8BsT06nB6AbjQSbN/oEeoGHaep2zK4R4JidkfGGEEaceszLpojN6VY5t46L8 CjlW4cZEFoUvRgzeD/10y4LGTrf7EUNWyMpblM4Ctg1Nxv87RQglEuWe6+JPBAmXc2Vq XKd62t55QYaRDD1oLZ/8X9MBezG898AspzPukUhWJEEB3iab/zfkrtPTT5IBYyBD0BPz 2mtv8LX4uW+Y2D5xDnsJ8Hl5lNuZt2tR/lzZ+/eu2pXznZtFZnWxnVO7/Z2Hz+oySTq+ jhZLGbrJDM/GAEFrwPnEMi428eNmukv5JND3l0aP3FenzTWgSOtT/b7GKnpsqKEcjqtt oFmg== 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=tDCZf1ozvew0khHIg+yukoVpVjf71KpwToacoJRhHt8=; b=rdGWYreCqQjrjt1JZMEYk0+n68DK9vBcGGOtQ9zpBrTB6uIHDuiiQcsQxHH9p6/29B MbUHIyZ+chltYNvviR6RvQ8ddNcaPlTJmwmg//zl0i5p5FRSJsknJmlaVL+XTy6ef9hs rsvm7TT00wdg97VAEVSEigXThxFnWweS7QmZm+6diiu7IHBZ0Ev4+U6ZpC+DJNz8Are/ ptAM8Ie7wVUPO5Nnh8ncXOjyet3tCpuGdsDHk8mISgEHE8FIu6L4BhkgvaTliD1DWRXn oOZFKuF6mSRSUfVAxkUr0xOtf77xl8a8XX0Dysnm1OempYL2g5QGBy/Oaf0wRKBHcLkV xirQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=oayZNfVC; 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=tDCZf1ozvew0khHIg+yukoVpVjf71KpwToacoJRhHt8=; b=J6nZlyg1kh8GVhqJ34oReEzJnL5BmrFoO3qWW60iSGHjg+g4GXybqPfJ+jtmd217jl eVXffBK1NVosdb141GvU7EtlWL3TX/murQXeCweWsXIo4AN0t/6LQCgg4cqspTUxMY+D 4hCacacCgE8jAQkN+sJ3R/8Jvagf6KJstfCnc= 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=tDCZf1ozvew0khHIg+yukoVpVjf71KpwToacoJRhHt8=; b=mqBIJ+OM8f6AzIetW20GWRlaSPc6DV2TS/3nxIkzBZsvq8GjPeZ8GX9CeILv9TCKJZ 2cHh+Bz6Ry8HN/v8sGOR+sQXbPVcAoVgl0wdEu9xE6oZ/1bFGYW5wBRSHEFw8U41W4o2 2lEsWs+W5a7p4WyXZ9b0xO/HrYv/EpYeVNTnnLyD1e+zSvp9+5gpBdso+3ipEJjpJBB+ SVKLIErvL+at5p1maQ2rKMsQknvh8zKIF7YpK8ZdLaNlLwyiMtm37tbKO6OzpJuHGg/w Dt70/09lk/mw9gvK8qfkdX+vJZ4ZS3acxq6ZG/w7wJDajZZB8OjbrxDFmXqE9b/yPC6u Bm+g== X-Gm-Message-State: AOAM5330nDZ7SQJ9X/RqIGCRVvd5B0ojS8q6K2mocDCvnpBdb8+iwP9I AOMYx1BBdc3cKgzML/w97VAUn3sq X-Google-Smtp-Source: ABdhPJyMHMhJc4LjaaCmStd434oLzUjm4DnQXXt+FFdhPfzcqHYDEExrcSma04PRi5ttpkpjTPVGtg== X-Received: by 2002:a17:90b:1a81:b0:1bc:ec26:40a6 with SMTP id ng1-20020a17090b1a8100b001bcec2640a6mr22179802pjb.0.1646143992497; Tue, 01 Mar 2022 06:13:12 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:902:cec1:b0:14f:f089:12b5 with SMTP id d1-20020a170902cec100b0014ff08912b5ls12454131plg.8.gmail; Tue, 01 Mar 2022 06:13:12 -0800 (PST) X-Received: by 2002:a17:90a:528b:b0:1bc:c5f9:82a with SMTP id w11-20020a17090a528b00b001bcc5f9082amr22038760pjh.210.1646143991844; Tue, 01 Mar 2022 06:13:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646143991; cv=none; d=google.com; s=arc-20160816; b=Dfk7HBW/ebfIVG1o+AyLbq99J+9LYUyxS2s7chcqAaO7fgsGuWnpxt581QYcONMfVg 4T+5TVYODXsWpUWNFuYhTGB3fV6B/nusoj/HTb/nLsydoywvMgNxO7hrnGI8zmcC9J09 GijRa80nMK17qV+yvoVD/emxjuHqp84uOyt6dA2bsdOEfx3diDXJQXBzuyRgmL2nD6LA Ox0Fj798CaBY0cKvVNs+dIAFvHOv66yZKmYdZmX+55QSReMuEgBrSGxuNFn0wmR7YnKk 595mP0nxyjwfLWIeCC3EGIG9FVL8JCxa+KY7O8vIIecTkBMXdcMHAoOOwRqPO8AziYKf KWCg== 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=RfOD5os58Zi+V6L7F7QFRD9/WvrhIP6GUWjSjvrBko0=; b=YbAL9R4zhnI0LofWEDsiWADjawKN9b1R9GNOq4lrZGFYFtGA8KCTIoifoBoa/B+ynw KIUkGNqe8shGqXXT3JSgpHvylMaThL0THvmVYifTMQjdFcLX6hqywW8fCFy0UiHtfqd0 MgTUAU49hseozCT0mP/iJDg+5SGHQoLn/pyQJ3Hdo8LTDMjHnBA2oJH2FsgVkbyo3kk9 SLY0psh5KXNztt4EeNaILX/tV43SkFI61Hda/Y5xWlbyyUKdxZZjDec0kkBLigfn0C1g f3AKTazEPCwoE+uvI9M+a7BVJC6vGbQpOjlKYsdHeWwLuPRj/LD/hFXbAXWVf/NVPv+q jaFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=oayZNfVC; 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 f10-20020a170902860a00b0014fe92899e3sor6796741plo.147.2022.03.01.06.13.11 for (Google Transport Security); Tue, 01 Mar 2022 06:13:11 -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:aa86:b0:14d:a4aa:e6f5 with SMTP id d6-20020a170902aa8600b0014da4aae6f5mr25940900plr.8.1646143991572; Tue, 01 Mar 2022 06:13:11 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a0a9:dbfb:dee9:8dc1:861a]) by smtp.gmail.com with ESMTPSA id d11-20020a056a0010cb00b004e1b76b09c0sm17317571pfu.74.2022.03.01.06.13.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Mar 2022 06:13:11 -0800 (PST) From: Jagan Teki To: Andrzej Hajda , Neil Armstrong , Robert Foss Cc: dri-devel@lists.freedesktop.org, linux-amarula@amarulasolutions.com, Jagan Teki , Chun-Kuang Hu , Philipp Zabel Subject: [PATCH v2 3/8] drm: mediatek: mtk_dsi: Switch to devm_drm_of_get_bridge Date: Tue, 1 Mar 2022 19:42:42 +0530 Message-Id: <20220301141247.126911-3-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220301141247.126911-1-jagan@amarulasolutions.com> References: <20220301141247.126911-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=oayZNfVC; 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: Chun-Kuang Hu Cc: Philipp Zabel Signed-off-by: Jagan Teki --- Changes for v2: - split the patch drivers/gpu/drm/mediatek/mtk_dsi.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) 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);