From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D8C863D47DB; Fri, 27 Mar 2026 08:34:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.167.242.64 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774600451; cv=none; b=Zic+sCIEj7So1bTbtpZEuNl/VybPffLqWwRR7cb1f0tvWcl1pjljY60wMaF8Z/yuKXeQVIIKMxuoFIJSM6oBE/715SIvDHJ9am+8dpoKvCE2cTPndIbqUXxPSWFm5qMGRTKI3OPmeU+V5Xjh3bQOOoy4GXwzmVcAbaWu2KzAHio= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774600451; c=relaxed/simple; bh=Rmk3YZOfeV80Jfhg4CfzxfdypSaxPXEVhEAPVsjEkUc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=OGF8IMMdmlErFOp4C7FdVqcxW7LvpLe9ydaEvZq33Xsk56fbsi5h9ZExOgFnvp33+oZsmbNcq5MS12ttSW/dOMgksfoeTb13vC+Eh7QKq97ASp+Cwi/uq98/WwxQ5vTjsbMgQ4pH3pZIHwPgOWdsByc1JGiQq/FTyIoPDnrNJ/w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com; spf=pass smtp.mailfrom=ideasonboard.com; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b=exyRGiEB; arc=none smtp.client-ip=213.167.242.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="exyRGiEB" Received: from killaraus.ideasonboard.com (2001-14ba-703d-e500--2a1.rev.dnainternet.fi [IPv6:2001:14ba:703d:e500::2a1]) by perceval.ideasonboard.com (Postfix) with UTF8SMTPSA id 347E67CA; Fri, 27 Mar 2026 09:32:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1774600367; bh=Rmk3YZOfeV80Jfhg4CfzxfdypSaxPXEVhEAPVsjEkUc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=exyRGiEBRpJf+51y+H0CSqe6/fPqeCUMrzT2XfyVvvcPEENDkOLBHvzewHFmJO0x+ VESpApUpUdLHvgmlmgnKKhFU0Bygk9dixMYw9yNhJNLvhmZeOkV99hsa5aN1Lqvu1I qiyYKmsDLhTCda1gvAxuj/Njt/d4mWN1Vox5yxUs= Date: Fri, 27 Mar 2026 10:34:04 +0200 From: Laurent Pinchart To: Luca Ceresoli Cc: Amin GATTOUT , Tomi Valkeinen , Kieran Bingham , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Geert Uytterhoeven , Magnus Damm , dri-devel@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] drm/rcar-du: Convert to of_drm_find_and_get_bridge() Message-ID: <20260327083404.GA2993961@killaraus.ideasonboard.com> References: <20260326-bridge-v1-1-c0c44b53f7b6@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: Hi Luca, On Fri, Mar 27, 2026 at 08:57:45AM +0100, Luca Ceresoli wrote: > On Thu Mar 26, 2026 at 9:10 PM CET, Amin GATTOUT wrote: > > of_drm_find_bridge() is deprecated. > > Replace it with of_drm_find_and_get_bridge() which increments > > the bridge refcount as required. > > Thanks for taking care of the conversion to the new API! I suspect you may be talking to a machine (possibly through a human proxy). > > --- a/drivers/gpu/drm/renesas/rcar-du/rcar_du_encoder.c > > +++ b/drivers/gpu/drm/renesas/rcar-du/rcar_du_encoder.c > > @@ -72,7 +72,7 @@ int rcar_du_encoder_init(struct rcar_du_device *rcdu, > > if (IS_ERR(bridge)) > > return PTR_ERR(bridge); > > } else { > > - bridge = of_drm_find_bridge(enc_node); > > + bridge = of_drm_find_and_get_bridge(enc_node); > > This change alone is not correct I'm afraid. The difference between > of_drm_find_bridge() and of_drm_find_and_get_bridge() is the latter get a > reference to the bridge, so you have to put that reference when the bridge > pointer is no more accessible. > > Have a look at previous commits doing the same API replacement, you can > find examples similar to this one, where: > > * the bridge pointer is stored in a local variable (not saved in a struct) > * the bridge pointer could be set wither by of_drm_find_bridge() or > a function adding a panel bridge > > Luca -- Regards, Laurent Pinchart