From mboxrd@z Thu Jan 1 00:00:00 1970 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 C506D10F994F for ; Wed, 8 Apr 2026 15:44:22 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1B04610E697; Wed, 8 Apr 2026 15:44:22 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=bootlin.com header.i=@bootlin.com header.b="F647SVWx"; dkim-atps=neutral Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) by gabe.freedesktop.org (Postfix) with ESMTPS id B9FD810E697 for ; Wed, 8 Apr 2026 15:44:21 +0000 (UTC) Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id C0A7DC5AA98; Wed, 8 Apr 2026 15:44:54 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 7B488603CB; Wed, 8 Apr 2026 15:44:20 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id C50F3104500FE; Wed, 8 Apr 2026 17:44:15 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1775663059; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:content-language:in-reply-to:references; bh=4EO/JE/FwVq0dU98Avlnkf4XMGjkvWX56jtayJxBDPc=; b=F647SVWxNQccNsBUe1ndY3QMSfrusQSw3UkSxpnohEADXhWn1093Dq3TCCqoY8KjCnS9/1 jcZzy/OchX2V0TElb2GGEbt6btkGDQuxBNQVmBxtUMTSOOqqlj3c6EtrkNONrQNPD5v4TV 0V1BCv0uHrycS1B47zX1nIwulJ2BsDhmEu4x+85wq8cEkXIKsk5nMPGK+Z84/h2iA496pe /qFHMCJvy0NUuLs05+X+fbrNitZt1EgKvQS21hPED5APEskf4lRxFz0X/g3QSKf3BwzSXP m5it+h1zO9eLVxTHnCO8zwHOV1IzsEfnfK710L5dcPrQXbLY4+mk7gD+nUKYsg== Message-ID: Date: Wed, 8 Apr 2026 17:44:56 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 2/4] drm/kmb/dsi: convert to of_drm_find_and_get_bridge() To: Luca Ceresoli , Biju Das , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Anitha Chrisanthus , Linus Walleij , Laurent Pinchart , Tomi Valkeinen , Kieran Bingham , Geert Uytterhoeven , Magnus Damm , Tomi Valkeinen Cc: Hui Pu , Ian Ray , Thomas Petazzoni , dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org References: <20260402-drm-bridge-alloc-getput-drm_of_find_bridge-4-v4-0-421781c8c061@bootlin.com> <20260402-drm-bridge-alloc-getput-drm_of_find_bridge-4-v4-2-421781c8c061@bootlin.com> Content-Language: en-US From: Louis Chauvet In-Reply-To: <20260402-drm-bridge-alloc-getput-drm_of_find_bridge-4-v4-2-421781c8c061@bootlin.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Last-TLS-Session-Version: TLSv1.3 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 4/2/26 18:27, Luca Ceresoli wrote: > of_drm_find_bridge() is deprecated. Move to its replacement > of_drm_find_and_get_bridge() which gets a bridge reference. > > This driver has global variables for the DSI host and DSI device, and code > to allocate them on probe but no code to free them when on remove. So it > does not at all support removal, and not even multiple instances. For this > reason putting the reference would be pointless here. > > Signed-off-by: Luca Ceresoli Reviewed-by: Louis Chauvet > --- > drivers/gpu/drm/kmb/kmb_dsi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/kmb/kmb_dsi.c b/drivers/gpu/drm/kmb/kmb_dsi.c > index aeb2f9f98f23..febca939bd01 100644 > --- a/drivers/gpu/drm/kmb/kmb_dsi.c > +++ b/drivers/gpu/drm/kmb/kmb_dsi.c > @@ -251,7 +251,7 @@ int kmb_dsi_host_bridge_init(struct device *dev) > return -EINVAL; > } > /* Locate drm bridge from the hdmi encoder DT node */ > - adv_bridge = of_drm_find_bridge(encoder_node); > + adv_bridge = of_drm_find_and_get_bridge(encoder_node); > of_node_put(dsi_out); > of_node_put(encoder_node); > if (!adv_bridge) { >