From patchwork Mon Jan 23 12:23:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 13112025 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 398DDC05027 for ; Mon, 23 Jan 2023 12:26:50 +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=NAyDk5GLkJied/heERDxS9g+QRdEZ68PLh1nzt2DLFI=; b=4jBJgjCiEEM+gS feWn0Av+n0vZ4oL2dooj52bwrGoL+Usnq5cgq+pYcy5XpZnbcl0n/FmS67fjwqfbiXMz3CrzEfTY3 muMDTYOeYcEizvqWIti7gkSbc3V84Vrlbnuwj8GyC59nZ6Jo7ICcIfrht8dITxTZ/MCA7L1Jnz7Is HugOHGl8LQw69yAyn0heq1O73ggn8DfIMKOGxlSE03ZM6DuoR5wPOiIq7BIhfdqlaLs4C0/+hL/VE GWS0ojmIt0LJCB3e46A6hKE4MGL6emKnJPrvJayAuMWwK02HjTsEwQJoJdcStPv9tLbpskFKFI8gu IUlYIskaY8u9ihlSIhJg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pJvtN-00H4b9-QW; Mon, 23 Jan 2023 12:25:42 +0000 Received: from mail-pl1-x634.google.com ([2607:f8b0:4864:20::634]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pJvrs-00H3yF-Dx for linux-arm-kernel@lists.infradead.org; Mon, 23 Jan 2023 12:24:09 +0000 Received: by mail-pl1-x634.google.com with SMTP id b17so11198338pld.7 for ; Mon, 23 Jan 2023 04:24:05 -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=mGTDxW/0FHkTpFMtVsyR5B6P9WvJldck4Y7e8f4Ze3U=; b=Bs0TV7ERk+1qlxrrL7Iq5xhDKr5wiGvfIOEQTt6IEY71jGdKwszKG4hIaiQyH4B9jK MwmxoJPwcb9LQqVnuhdd2t8InREwkVC0UlbadxWthtOhwJIYUpmyHdcc/u0Zh8F29ZnO D5p/egAtj8nfw/RGK72SWkaPkEyVTCoegod7I= 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=mGTDxW/0FHkTpFMtVsyR5B6P9WvJldck4Y7e8f4Ze3U=; b=NYFAIs4v8ZOGfpd16LQdW39ir49YQZktajNzlFxOLexk4stN4Y4GvKXv2Oh/oQRVVL TanzSWiW+hVNcAalzsjiUJuTM94vYjKnRjhe3siJugQILu6uKe8dUoMtwjy/y7nwDRJ2 wplvpohPDR6/PfmKvn8TD/pttpEOlWLdzgqtprCu43bgqYDKdsbGrDKS+X1nqHn97lef ayeRqvsQUNxZTiIUraTMpU1r40G1Mn5YOx6Z9a0BDadkaKZJbIJqinz3aZWkh59yuq33 XUwxSw4QnzBnm4sCelloaej/fOCF0yEmT21MD4tnnTf1uTyNYec4LiBn1xCStqBgTwmv QdZw== X-Gm-Message-State: AFqh2krN5lIbb0HAosLZTF8kZfdGcZkT9hAloJJRdFdnUzF7P/qt5cpW QYihaG8FbQrqO9CJ4Xkce80FSA== X-Google-Smtp-Source: AMrXdXvsTRgXZ7RQIq+gYIX9+q5YLVd4v+79GSby+iqOUZw8lOw/ZbfaFOb/iKF6P9GVg+/bbqjmZg== X-Received: by 2002:a05:6a20:a00d:b0:9d:efbf:6623 with SMTP id p13-20020a056a20a00d00b0009defbf6623mr28597401pzj.49.1674476645425; Mon, 23 Jan 2023 04:24:05 -0800 (PST) Received: from localhost.localdomain ([2405:201:c00a:a15f:2279:f361:f93b:7971]) by smtp.gmail.com with ESMTPSA id w10-20020a170902e88a00b001960806728asm1291811plg.88.2023.01.23.04.23.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Jan 2023 04:24:04 -0800 (PST) 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 v11 04/18] drm: exynos: dsi: Switch to devm_drm_of_dsi_get_bridge Date: Mon, 23 Jan 2023 17:53:05 +0530 Message-Id: <20230123122319.261341-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230123122319.261341-1-jagan@amarulasolutions.com> References: <20230123122319.261341-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230123_042408_506257_CA1C5A57 X-CRM114-Status: GOOD ( 13.57 ) 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 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);