From patchwork Fri Jul 8 09:56:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 12910903 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 4FEE4C43334 for ; Fri, 8 Jul 2022 10:10:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AD794113887; Fri, 8 Jul 2022 09:58:53 +0000 (UTC) Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by gabe.freedesktop.org (Postfix) with ESMTPS id 464D5113887 for ; Fri, 8 Jul 2022 09:58:53 +0000 (UTC) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 09F9E32009CD; Fri, 8 Jul 2022 05:58:51 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 08 Jul 2022 05:58:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1657274331; x=1657360731; bh=+z CUXkmF4tS8sqQ1rQ2w5YxcSkyBM2Wb6w6+V0uBnTY=; b=V89Z6yiK+q7hxPDwVE fNad3LaMWUOPEqKD2kwTiplh1C7ouFrYRGOWQ5voMVanv34TRskzSjt1jszD2LEg vWRoqknxCf9LC4gd6v1cctNapJUdknl1Vg7Zfmfzf2+D+JdKZhi8IMSDeAtYPl2U GBkzu9/Dz+aV3D4Jxm0sqfjW08GiDcynatJx8tWo0GUvVUWTZc2cCsvOoLYmId9p 1gU3svF4dkuxuEy2p9fuy8THPmD0wnFx2b17q2YJqLUrES4vcjaVsrqmcGeeFkxo jkpzw55ZCt8Oq3jEvB59DfwP4bSESQg0TkGSLcuRg8qjdR3JumLGmeiWm8f9FMu1 L4Pg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; t=1657274331; x=1657360731; bh=+zCUXkmF4tS8s qQ1rQ2w5YxcSkyBM2Wb6w6+V0uBnTY=; b=zoQXXeJlfPQMUDHonJZDM40jWQfX9 fBGpPiDqAeG39beueBahKYE+1yPl4fYHWCcbjQQvJzzCCzegdjvkAHCGFndLdu29 PEV1E4Lm5fy2zZMSrZnCXJPbfufVQnmdAyfwznCV78PjVPUHL+xWc+lbCgeykEiu Wu2vJNb7GeNkIIjHRHO171AVCf8WSg2vnyCVykceCrI8Su6tdQ4FepZlBY7yJoAA i2dXEYF62akilUhvfuixqRBeq3jdT5dB4w+ShYYdYo9MDGyDrHmxf3QYOyhs81mP 4WK4+FobmkOMUmrEn8BZ7HISlhcwBCDJ48qY3Jj8IGtDPdzYhL3Qtgl+g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudeijedgvdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepofgrgihi mhgvucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrg htthgvrhhnpeelkeefteduhfekjeeihfetudfguedvveekkeetteekhfekhfdtlefgfedu vdejhfenucevlhhushhtvghrufhiiigvpeeinecurfgrrhgrmhepmhgrihhlfhhrohhmpe hmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 8 Jul 2022 05:58:51 -0400 (EDT) From: Maxime Ripard To: Daniel Vetter , David Airlie , Maarten Lankhorst , Thomas Zimmermann , Maxime Ripard Subject: [PATCH v4 34/69] drm/vc4: dsi: Switch to drmm_of_get_bridge Date: Fri, 8 Jul 2022 11:56:32 +0200 Message-Id: <20220708095707.257937-35-maxime@cerno.tech> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220708095707.257937-1-maxime@cerno.tech> References: <20220708095707.257937-1-maxime@cerno.tech> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dri-devel@lists.freedesktop.org, Dave Stevenson Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The current code uses a device-managed function to retrieve the next bridge downstream. However, that means that it will be removed at unbind time, where the DRM device is still very much live and might still have some applications that still have it open. Switch to a DRM-managed variant to clean everything up once the DRM device has been last closed. Acked-by: Thomas Zimmermann Reviewed-by: Dave Stevenson Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_dsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vc4/vc4_dsi.c b/drivers/gpu/drm/vc4/vc4_dsi.c index 1a55b7ea52a8..13266ff334d0 100644 --- a/drivers/gpu/drm/vc4/vc4_dsi.c +++ b/drivers/gpu/drm/vc4/vc4_dsi.c @@ -1672,7 +1672,7 @@ static int vc4_dsi_bind(struct device *dev, struct device *master, void *data) return ret; } - dsi->bridge = devm_drm_of_get_bridge(dev, dev->of_node, 0, 0); + dsi->bridge = drmm_of_get_bridge(drm, dev->of_node, 0, 0); if (IS_ERR(dsi->bridge)) return PTR_ERR(dsi->bridge);