Message ID | 20250320-drm-bridge-refcount-v8-3-b3ddaa9f1368@bootlin.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org> 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 556E1C36001 for <linux-arm-kernel@archiver.kernel.org>; Thu, 20 Mar 2025 16:03:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=jyBNDLsArbdd7WHk93rkhCfp9ThfO49YHtAhELFf8JY=; b=rB8yTT1+KQU11H+7CLK2WIPqUL PYa6O848/qYvh1WGNzO0rJN9j1rRi5YBe9Ph4avMnbteBMU0D36XVxK5MrbkWxbPs+l/e3zDhoX1V vLSkkDACew7Wz2UPv3lCG8Kai5Ml0DjjlQTFtfN3wPRstlKfh15cHajrm/YC2QQeSQUXswuFmpumk pp3PemXGIw9Q01fZtX43Sd1wATSuEKEn8aWv0J601RGHVQhpeyC6zXwxcSoGTIF3fHo89t7IYE2aW pYsfhLZ+46FgSi1/MVhRdXMAS6RvaK4LcJ8jtmAOvCpcXbD2Pgh0jI99d/Chefowat+wRWKNqPukm /E6VEaxA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tvIMF-0000000CbyF-1uSy; Thu, 20 Mar 2025 16:02:59 +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 1tvI2b-0000000CZD9-0Ikv for linux-arm-kernel@lists.infradead.org; Thu, 20 Mar 2025 15:42:42 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 7E2B444417; Thu, 20 Mar 2025 15:42:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1742485359; 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=jyBNDLsArbdd7WHk93rkhCfp9ThfO49YHtAhELFf8JY=; b=BOwk98/TpGkOxzJx4oiUhpGhy8r0YMvaGQJYOINSzpbd20HMenb3xP12VjS//hVhI72Iam t9Dpvqpn8S9iRISG6Tg5phGO/QXvlbJB2vfZGxLCXG957uZvZcbWhedktWUQnkjPAoXxIs HkQAv1VRQ7IgMzM3YKaxo4NQO0jqfvwhuwPuz9VTzVxZXedGBuvGeTx06uh/oLs4vzRkd5 JxTYtaW0T0J4NlVjtMed+UKicoT37q+vyPsn0wG71dm+a7wyCghXMAbpy1ZMeukJ1pdC8t Qkzr8akHHSnnpISG93yuGxJDUJ54W0Ipu4fHEWwA6kW7Ab289RadMxvwAhSdfQ== From: Luca Ceresoli <luca.ceresoli@bootlin.com> Date: Thu, 20 Mar 2025 16:42:12 +0100 Subject: [PATCH v8 3/5] drm/bridge: deprecate old-style bridge allocation MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20250320-drm-bridge-refcount-v8-3-b3ddaa9f1368@bootlin.com> References: <20250320-drm-bridge-refcount-v8-0-b3ddaa9f1368@bootlin.com> In-Reply-To: <20250320-drm-bridge-refcount-v8-0-b3ddaa9f1368@bootlin.com> To: Andrzej Hajda <andrzej.hajda@intel.com>, Neil Armstrong <neil.armstrong@linaro.org>, Robert Foss <rfoss@kernel.org>, Laurent Pinchart <Laurent.pinchart@ideasonboard.com>, Jonas Karlman <jonas@kwiboo.se>, Jernej Skrabec <jernej.skrabec@gmail.com>, Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Maxime Ripard <mripard@kernel.org>, Thomas Zimmermann <tzimmermann@suse.de>, David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>, Marek Vasut <marex@denx.de>, Stefan Agner <stefan@agner.ch>, Shawn Guo <shawnguo@kernel.org>, Sascha Hauer <s.hauer@pengutronix.de>, Pengutronix Kernel Team <kernel@pengutronix.de>, Fabio Estevam <festevam@gmail.com>, Inki Dae <inki.dae@samsung.com>, Jagan Teki <jagan@amarulasolutions.com>, Marek Szyprowski <m.szyprowski@samsung.com> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>, Anusha Srivatsa <asrivats@redhat.com>, Paul Kocialkowski <paulk@sys-base.io>, Dmitry Baryshkov <lumag@kernel.org>, =?utf-8?q?Herv=C3=A9_Codina?= <herve.codina@bootlin.com>, Hui Pu <Hui.Pu@gehealthcare.com>, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Luca Ceresoli <luca.ceresoli@bootlin.com> X-Mailer: b4 0.14.2 X-GND-State: clean X-GND-Score: -100 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddugeekiedtucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhfffugggtgffkfhgjvfevofesthejredtredtjeenucfhrhhomhepnfhutggrucevvghrvghsohhlihcuoehluhgtrgdrtggvrhgvshholhhisegsohhothhlihhnrdgtohhmqeenucggtffrrghtthgvrhhnpeeiieeuvdfftefgueduleehueetgffgjeeitedtteetkeeuueeuueekveevvdeuveenucfkphepvdgrtddvmeeijedtmedvtddvtdemvggrtddumegsvgegudemleehvgejmeefgeefmeeludefvgenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvrgdtvdemieejtdemvddtvddtmegvrgdtudemsggvgedumeelhegvjeemfeegfeemledufegvpdhhvghloheplgduledvrdduieekrddujeekrdduudekngdpmhgrihhlfhhrohhmpehluhgtrgdrtggvrhgvshholhhisegsohhothhlihhnrdgtohhmpdhnsggprhgtphhtthhopeefuddprhgtphhtthhopehrfhhoshhssehkvghrnhgvlhdrohhrghdprhgtphhtthhopegrnhgurhiivghjrdhhrghjuggrsehinhhtvghlrdgtohhmpdhrtghpthhtohepthiiihhmmhgvrhhmrghnnhesshhushgvrdguvgdprhgtphhtthhopehimhigs ehlihhsthhsrdhlihhnuhigrdguvghvpdhrtghpthhtohepjhgvrhhnvghjrdhskhhrrggsvggtsehgmhgrihhlrdgtohhmpdhrtghpthhtoheplhhutggrrdgtvghrvghsohhlihessghoohhtlhhinhdrtghomhdprhgtphhtthhopefnrghurhgvnhhtrdhpihhntghhrghrthesihguvggrshhonhgsohgrrhgurdgtohhmpdhrtghpthhtohephhgvrhhvvgdrtghoughinhgrsegsohhothhlihhnrdgtohhm X-GND-Sasl: luca.ceresoli@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250320_084241_258477_4637EF8E X-CRM114-Status: GOOD ( 10.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org |
Series |
drm/bridge: add devm_drm_bridge_alloc() with bridge refcount
|
expand
|
diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c index 2f2ecb73308e601b1a53ec8e7110933cef59b5da..17659b1cbdeae04e10b76f2aabc8ebba65c4f6e1 100644 --- a/drivers/gpu/drm/drm_bridge.c +++ b/drivers/gpu/drm/drm_bridge.c @@ -295,6 +295,10 @@ EXPORT_SYMBOL(__devm_drm_bridge_alloc); * drm_bridge_add - add the given bridge to the global bridge list * * @bridge: bridge control structure + * + * The bridge to be added must have been allocated by + * devm_drm_bridge_alloc(). Old-style allocation by kzalloc(), + * devm_kzalloc() and similar is deprecated. */ void drm_bridge_add(struct drm_bridge *bridge) {
All DRM bridges are now supposed to be allocated using devm_drm_bridge_alloc(), which is cleaner and necessary to support refcounting. Deprecate old school allocation using kzalloc and derivatives. In the absence of a drm_bridge_init() or such initialization function, document the deprecation on the first DRM bridge core function that is called after allocation, i.e. drm_bridge_add(). Suggested-by: Maxime Ripard <mripard@kernel.org> Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> --- This patch was added in v8. --- drivers/gpu/drm/drm_bridge.c | 4 ++++ 1 file changed, 4 insertions(+)