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 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 D75AAC02194 for ; Fri, 7 Feb 2025 10:45:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=S2JN7acEOnnpYF6SorF298vSINNq+oWjlH4/5NBSfyY=; b=St9YBuuds8Zv1u DvhfTOu27y3PW7Clsr7AzLT6rdInfeOoYd5/1RzHxpzWlHDRHN3m8LK9iz4FNyd6UqGM1TWB/v+bl bPNkzX3IVPMqXB4NgkpL4cGQNLHtIbDVPsmlCOG2wb+Vi9gIHDOjgZPGdVh5R/ujw5hMfBFAGvy4S YrrmmAj/6DKAFQxxbp2643/QWUDhkUe3AVHgc62e7prDG7tillr1wwHjgsjwDHCGFlYF+qTxn643q ARsOW/E0ZmWtlLHxCjGFXtQmzxpnwb697lAdnYWugt6zKQQgsVFdpSPJ3xGSXuLJCj5pJIIEKqG0V eAM3MhMSj+OhIw7H+cwA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tgLrb-00000009Fbe-3Iyb; Fri, 07 Feb 2025 10:45:35 +0000 Received: from relay8-d.mail.gandi.net ([2001:4b98:dc4:8::228]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tgLqD-00000009FGX-08EM for linux-arm-kernel@lists.infradead.org; Fri, 07 Feb 2025 10:44:10 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id CA82E4341E; Fri, 7 Feb 2025 10:44:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1738925046; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=S2JN7acEOnnpYF6SorF298vSINNq+oWjlH4/5NBSfyY=; b=HaNH6WWFViXuiG2j0REEdEA7Huzmr47PqsGfPagJxsHdJYbotxExCUATLn7KdciQ5z+OeE SnVoCCuh7O0xu/LfCMmQJwrpdXU9wivbuYvqL3xNOv857o9Kt5lTkkd/BelPnyK0SK7oD/ eHx646DAA+sZUqiq3xhAMU2z4255Uq4y4P2sL2XLOKKoag0s8Ya0dVf5/s/GlGB2nSvmqr xeP7XFChYhGVl+Fyfkg+QJUnP5VcHft/XlsrsoE4Ev0W+NRdxPZ0tXdKMHmDi53JWapH7P gEIQuiMR/bsX0Qi+Z8oLFEQYHSjji99C06ryYEuNQMDD4P/dbggMiSEFEuBUOw== Date: Fri, 7 Feb 2025 11:44:01 +0100 From: Luca Ceresoli To: Dmitry Baryshkov Subject: Re: [PATCH v6 15/26] drm/bridge: devm_drm_of_get_bridge and drmm_of_get_bridge: automatically put the bridge Message-ID: <20250207114401.7869b422@booty> In-Reply-To: References: <20250206-hotplug-drm-bridge-v6-0-9d6f2c9c3058@bootlin.com> <20250206-hotplug-drm-bridge-v6-15-9d6f2c9c3058@bootlin.com> Organization: Bootlin X-Mailer: Claws Mail 4.0.0 (GTK+ 3.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvledtkecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhepfffhvfevuffkjghfohfogggtgfesthejredtredtvdenucfhrhhomhepnfhutggrucevvghrvghsohhlihcuoehluhgtrgdrtggvrhgvshholhhisegsohhothhlihhnrdgtohhmqeenucggtffrrghtthgvrhhnpeeglefffefghefhtddvfeeufeeiveekgffgleekieduteekkeetvdehudekgfdvvdenucffohhmrghinhepsghoohhtlhhinhdrtghomhenucfkphepvdgrtddvmeeijedtmedvtddvtdemvggrtddumegtvgejvgemiegtgegvmeeitggtjeemleekgeejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepvdgrtddvmeeijedtmedvtddvtdemvggrtddumegtvgejvgemiegtgegvmeeitggtjeemleekgeejpdhhvghlohepsghoohhthidpmhgrihhlfhhrohhmpehluhgtrgdrtggvrhgvshholhhisegsohhothhlihhnrdgtohhmpdhnsggprhgtphhtthhopeefjedprhgtphhtthhopegumhhithhrhidrsggrrhihshhhkhhovheslhhinhgrrhhordhorhhgpdhrtghpthhtohepshhimhhonhgrsehffhiflhhlrdgthhdprhgtphhtthhopehinhhkihdruggrvgesshgrmhhsuhhnghdrt ghomhdprhgtphhtthhopehjrghgrghnsegrmhgrrhhulhgrshholhhuthhiohhnshdrtghomhdprhgtphhtthhopehmrdhsiiihphhrohifshhkihesshgrmhhsuhhnghdrtghomhdprhgtphhtthhopegtrghtrghlihhnrdhmrghrihhnrghssegrrhhmrdgtohhmpdhrtghpthhtohepfihilhhlsehkvghrnhgvlhdrohhrghdprhgtphhtthhopehshhgrfihnghhuoheskhgvrhhnvghlrdhorhhg X-GND-Sasl: luca.ceresoli@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250207_024409_221960_97C42C84 X-CRM114-Status: GOOD ( 18.56 ) 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: , Cc: Alexandre Belloni , =?UTF-8?Q?Herv?= =?UTF-8?Q?=C3=A9?= Codina , Thomas Petazzoni , linux-doc@vger.kernel.org, Catalin Marinas , Paul Kocialkowski , dri-devel@lists.freedesktop.org, Claudiu Beznea , Laurent Pinchart , Andrzej Hajda , David Airlie , Fabio Estevam , Marek Szyprowski , Simona Vetter , Robert Foss , Jonathan Corbet , Sam Ravnborg , Jernej Skrabec , Daniel Thompson , Jagan Teki , Jessica Zhang , Thomas Zimmermann , Will Deacon , Jonas Karlman , Sascha Hauer , Maarten Lankhorst , Maxime Ripard , Inki Dae , linux-arm-kernel@lists.infradead.org, Neil Armstrong , Boris Brezillon , linux-kernel@vger.kernel.org, Paul Kocialkowski , Pengutronix Kernel Team , Shawn Guo Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, 7 Feb 2025 05:17:43 +0200 Dmitry Baryshkov wrote: > On Thu, Feb 06, 2025 at 07:14:30PM +0100, Luca Ceresoli wrote: > > Add a devm/drmm action to these functions so the bridge reference is > > dropped automatically when the caller is removed. > > I think the get() should go to the underlying of_drm_bridge_find() function. It is done in the following patch. Indeed I could swap patches 15 and 16 for clarity. Or I could squash together patches 14+15+16, as they are various parts or the refcounted bridge implementation, but I felt like keeping them separated would help reviewing. > Also it really feels like it's an overkill to keep the wrappers. After > getting bridge being handled by the panel code would it be possible to > drop all of them? Do you mean having only drm_of_get_bridge_by_node(), without any devm or drmm variant? I'm not sure it is a good idea. Most DRM code (well, all of it, technically) is currently unable of working with refcounted bridges, but if they use the devm variant they will put the ref when they disappear. > Then this patch might introduce one new devm_ > function? Or are drmm_ functions actually being used to store data in > the drmm-managed memory? Which devm function are you thinking about? Sorry, I'm not following here. Luca -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com