From: Peter Rosin Date: Mon, 6 Aug 2018 06:19:10 +0000 (+0200) Subject: drm: bridge: document bridge attach/detach imbalance X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=169cc4c7a14e988985c8833ddec2f3e897de2c28;p=openwrt%2Fstaging%2Fblogic.git drm: bridge: document bridge attach/detach imbalance Since commit 4a878c03d562 ("drm: bridge: Detach bridge from encoder at encoder cleanup time"), it is generally no longer correct to detach bridges from encoders manually. Document that. Signed-off-by: Peter Rosin Signed-off-by: Andrzej Hajda Link: https://patchwork.freedesktop.org/patch/msgid/20180806061910.29914-3-peda@axentia.se --- diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c index 1638bfe9627c..ba7025041e46 100644 --- a/drivers/gpu/drm/drm_bridge.c +++ b/drivers/gpu/drm/drm_bridge.c @@ -104,6 +104,10 @@ EXPORT_SYMBOL(drm_bridge_remove); * If non-NULL the previous bridge must be already attached by a call to this * function. * + * Note that bridges attached to encoders are auto-detached during encoder + * cleanup in drm_encoder_cleanup(), so drm_bridge_attach() should generally + * *not* be balanced with a drm_bridge_detach() in driver code. + * * RETURNS: * Zero on success, error code on failure */