提交 6e15174e 编写于 作者: L Laurent Pinchart 提交者: Archit Taneja

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: NLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: NArchit Taneja <architt@codeaurora.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1481709550-29226-6-git-send-email-laurent.pinchart+renesas@ideasonboard.com
上级 4a878c03
...@@ -159,8 +159,16 @@ void drm_encoder_cleanup(struct drm_encoder *encoder) ...@@ -159,8 +159,16 @@ void drm_encoder_cleanup(struct drm_encoder *encoder)
* the indices on the drm_encoder after us in the encoder_list. * the indices on the drm_encoder after us in the encoder_list.
*/ */
if (encoder->bridge) if (encoder->bridge) {
drm_bridge_detach(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); drm_mode_object_unregister(dev, &encoder->base);
kfree(encoder->name); kfree(encoder->name);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册