1
0
Fork 0

drm: bridge: Detach all bridges in a chain at encoder cleanup time

Instead of detaching only the bridge directly connected to the encoder,
detach all bridges in the chain.

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-6-git-send-email-laurent.pinchart+renesas@ideasonboard.com
hifive-unleashed-5.1
Laurent Pinchart 2016-11-29 20:55:44 +02:00 committed by Archit Taneja
parent 4a878c03d5
commit 6e15174ecd
1 changed files with 10 additions and 2 deletions

View File

@ -159,8 +159,16 @@ void drm_encoder_cleanup(struct drm_encoder *encoder)
* the indices on the drm_encoder after us in the encoder_list.
*/
if (encoder->bridge)
drm_bridge_detach(encoder->bridge);
if (encoder->bridge) {
struct drm_bridge *bridge = encoder->bridge;
struct drm_bridge *next;
while (bridge) {
next = bridge->next;
drm_bridge_detach(bridge);
bridge = next;
}
}
drm_mode_object_unregister(dev, &encoder->base);
kfree(encoder->name);