diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2016-11-28 18:32:05 +0200 |
---|---|---|
committer | Archit Taneja <architt@codeaurora.org> | 2016-12-18 16:32:49 +0530 |
commit | 4a878c03d56214a3dcf1a014e17c93bcdc587668 (patch) | |
tree | 86dfb26724bec8cc0404b315e775e96ee2111e50 /drivers/gpu/drm/drm_bridge.c | |
parent | 3bb80f249525c059572d4bc89ac77ac2e511bcbe (diff) | |
download | linux-4a878c03d56214a3dcf1a014e17c93bcdc587668.tar.gz linux-4a878c03d56214a3dcf1a014e17c93bcdc587668.tar.bz2 linux-4a878c03d56214a3dcf1a014e17c93bcdc587668.zip |
drm: bridge: Detach bridge from encoder at encoder cleanup time
Most drivers that use bridges forgot to detach them at cleanup time.
Instead of fixing them one by one, detach the bridge in the core
drm_encoder_cleanup() function.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1481709550-29226-5-git-send-email-laurent.pinchart+renesas@ideasonboard.com
Diffstat (limited to 'drivers/gpu/drm/drm_bridge.c')
-rw-r--r-- | drivers/gpu/drm/drm_bridge.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c index 850bd6509ef1..cd10095e8d00 100644 --- a/drivers/gpu/drm/drm_bridge.c +++ b/drivers/gpu/drm/drm_bridge.c @@ -28,6 +28,8 @@ #include <drm/drm_bridge.h> #include <drm/drm_encoder.h> +#include "drm_crtc_internal.h" + /** * DOC: overview * @@ -145,16 +147,6 @@ int drm_bridge_attach(struct drm_encoder *encoder, struct drm_bridge *bridge, } EXPORT_SYMBOL(drm_bridge_attach); -/** - * drm_bridge_detach - deassociate given bridge from its DRM device - * - * @bridge: bridge control structure - * - * Called by a kms driver to unlink the given bridge from its DRM device. - * - * Note that tearing down links between the bridge and our encoder/bridge - * objects needs to be handled by the kms driver itself. - */ void drm_bridge_detach(struct drm_bridge *bridge) { if (WARN_ON(!bridge)) @@ -168,7 +160,6 @@ void drm_bridge_detach(struct drm_bridge *bridge) bridge->dev = NULL; } -EXPORT_SYMBOL(drm_bridge_detach); /** * DOC: bridge callbacks |