Message ID | 20250320-drm-bridge-refcount-v8-3-b3ddaa9f1368@bootlin.com (mailing list archive) |
---|---|
State | New |
Headers | show |
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(+)