Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <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

authored by

Peter Rosin and committed by
Andrzej Hajda
169cc4c7 eb1d23d7

+4
+4
drivers/gpu/drm/drm_bridge.c
··· 104 104 * If non-NULL the previous bridge must be already attached by a call to this 105 105 * function. 106 106 * 107 + * Note that bridges attached to encoders are auto-detached during encoder 108 + * cleanup in drm_encoder_cleanup(), so drm_bridge_attach() should generally 109 + * *not* be balanced with a drm_bridge_detach() in driver code. 110 + * 107 111 * RETURNS: 108 112 * Zero on success, error code on failure 109 113 */