From patchwork Thu Jan 26 14:44:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 13117259 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D8912C05027 for ; Thu, 26 Jan 2023 14:47:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=uReIO1GQk+8uoPHAs4DTAXncfEcom+eiMGwGGVftu34=; b=iSHOHysDVK7zFb jfxbnlPNXz3VXSLjmEZdOYs96y7xqdO8y4IcXNaqQ4MClstsEdbPlJnvv+BLVd19/56MMbW4q/2LI PYvPM+42PbI45JzMlM6Cf6OSTzCH5VmPfGeIXMV813qkXYGiSw/BTiiK4+oizu5JSM0YVeX5J/wp4 3UMIiL6FXZfMQ6FeER0DvLRodA91tBRTD+0DZPuJAiBvkPmWj5p2hkjzhp3uXuzOIV8j3GUIQSXsp ghvAGSAmLthTu+vBxNz3cenZdAE3tMIEDqlh7QParlj5KnQgWjmieMHI9S5udJUf9qq4Fxp7pRH3W qHG1c44mRUWDJeVQs02A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pL3W0-00BGHa-8Y; Thu, 26 Jan 2023 14:46:12 +0000 Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pL3VN-00BG1s-K8 for linux-arm-kernel@lists.infradead.org; Thu, 26 Jan 2023 14:45:35 +0000 Received: by mail-pj1-x1031.google.com with SMTP id m11so1749238pji.0 for ; Thu, 26 Jan 2023 06:45:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=+otNyxyXWcvyXtJMZVAopiBO8ADOw+cl3pmhYxy9GFM=; b=eXOCY6fEwa1JrUYgLzhqoNqUhakM22BvEl43yn19idNsGR+O6No3F5Bq4A/xaTf4xZ 745lwgYE0mn6euJXiQ1QuJG6QTobS8z0nE6n8bphXGLpqJ8BW1KWkyysgi/EHGlpp7AA hbcdWsoO4+FWpPACsw+mi56ljGfDZqR/dmzzE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding: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=+otNyxyXWcvyXtJMZVAopiBO8ADOw+cl3pmhYxy9GFM=; b=a+ou8tvSePFRnY0oHCZWPSlmwg5Qp1TNghUoo1rCO/XVZt+bRf6qd2FpC4Qu3/7+lf sDbqdylT2E4rLQtBAHr6tWSZ0vzPz3Pvmm65p6YV1I8DR2YhUN+kKePUq2+Xp1dOWpwI PDcENKxQ2FtyOT8vFxbp67nchESYiQ6egw7hc25sfxHZdunD5WJue81czKRg1zVa1rGC ulEIobdi7z1EaCFgEtjhiL293rQfKWkZVS2BNWjEZ8w0VbAqCadR4nL2b3np/uyPoT6A 91DUgpSiQBm2TTPuoeQhEASxj3zauykivAcI+5Mji35lPJC+gRdbBJ/baYAT7QIc3t/T XLfA== X-Gm-Message-State: AFqh2kq3hohuCN57e+lc/gUUHKChnCtCgaGTRfab/7UbLTG7uvhsAiDD p9f+DD9xXOYoTQxceTLVO2XsVQ== X-Google-Smtp-Source: AMrXdXuNdw1GnUQgFqRPC5d02u5dQmcpQR8QFkHUIq13Y/hHY9DQ4R191oCz8HOpqTIIevqOMLTBuA== X-Received: by 2002:a05:6a20:8b88:b0:b8:aca6:b64f with SMTP id m8-20020a056a208b8800b000b8aca6b64fmr34401167pzh.34.1674744329524; Thu, 26 Jan 2023 06:45:29 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a238:3cb1:2156:ef87:8af5]) by smtp.gmail.com with ESMTPSA id d197-20020a6336ce000000b0042988a04bfdsm823660pga.9.2023.01.26.06.45.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Jan 2023 06:45:28 -0800 (PST) From: Jagan Teki To: Andrzej Hajda , Inki Dae , Marek Szyprowski , Seung-Woo Kim , Kyungmin Park , Frieder Schrempf , Tim Harvey , Adam Ford , Robert Foss , Laurent Pinchart , 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 v12 04/18] drm: exynos: dsi: Switch to devm_drm_of_dsi_get_bridge Date: Thu, 26 Jan 2023 20:14:13 +0530 Message-Id: <20230126144427.607098-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230126144427.607098-1-jagan@amarulasolutions.com> References: <20230126144427.607098-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230126_064533_681889_308EE341 X-CRM114-Status: GOOD ( 13.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org devm_drm_of_dsi_get_bridge is capable of looking up the downstream DSI bridge and panel and trying to add a panel bridge if the panel is found. Replace explicit finding calls with devm_drm_of_dsi_get_bridge. Signed-off-by: Jagan Teki --- Changes for v12, v11: - none Changes for v10: - new patch drivers/gpu/drm/exynos/exynos_drm_dsi.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_dsi.c b/drivers/gpu/drm/exynos/exynos_drm_dsi.c index df15501b1075..4a165764121d 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_dsi.c +++ b/drivers/gpu/drm/exynos/exynos_drm_dsi.c @@ -1470,18 +1470,9 @@ static int exynos_dsi_host_attach(struct mipi_dsi_host *host, struct device *dev = dsi->dev; struct drm_encoder *encoder = &dsi->encoder; struct drm_device *drm = encoder->dev; - struct drm_panel *panel; int ret; - panel = of_drm_find_panel(device->dev.of_node); - if (!IS_ERR(panel)) { - dsi->out_bridge = devm_drm_panel_bridge_add(dev, panel); - } else { - dsi->out_bridge = of_drm_find_bridge(device->dev.of_node); - if (!dsi->out_bridge) - dsi->out_bridge = ERR_PTR(-EINVAL); - } - + dsi->out_bridge = devm_drm_of_dsi_get_bridge(dev, dev->of_node, 1, 0); if (IS_ERR(dsi->out_bridge)) { ret = PTR_ERR(dsi->out_bridge); DRM_DEV_ERROR(dev, "failed to find the bridge: %d\n", ret); @@ -1531,8 +1522,6 @@ static int exynos_dsi_host_detach(struct mipi_dsi_host *host, struct exynos_dsi *dsi = host_to_dsi(host); struct drm_device *drm = dsi->encoder.dev; - dsi->out_bridge = NULL; - if (drm->mode_config.poll_enabled) drm_kms_helper_hotplug_event(drm);