drm: bridge: document bridge attach/detach imbalance
authorPeter Rosin <peda@axentia.se>
Mon, 6 Aug 2018 06:19:10 +0000 (08:19 +0200)
committerAndrzej Hajda <a.hajda@samsung.com>
Thu, 13 Sep 2018 09:28:12 +0000 (11:28 +0200)
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 <peda@axentia.se>
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180806061910.29914-3-peda@axentia.se
drivers/gpu/drm/drm_bridge.c

index 1638bfe9627ce21c08ccb3e17b868d13c466bb16..ba7025041e4641ea16858497fde02dee9dd3c8f4 100644 (file)
@@ -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
  */