提交 d352f352 编写于 作者: C Chris Wilson 提交者: Daniel Vetter

drm: Show leaked connectors upon unload

After warning that the connector list is not empty on device
unregistration (i.e. module unload) also print out which connectors are
still hanging around to aide finding the leak.
Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20170119090513.4154-1-chris@chris-wilson.co.uk
上级 717c8ae7
......@@ -421,7 +421,12 @@ void drm_mode_config_cleanup(struct drm_device *dev)
drm_connector_unreference(connector);
}
drm_connector_list_iter_put(&conn_iter);
WARN_ON(!list_empty(&dev->mode_config.connector_list));
if (WARN_ON(!list_empty(&dev->mode_config.connector_list))) {
drm_connector_list_iter_get(dev, &conn_iter);
drm_for_each_connector_iter(connector, &conn_iter)
DRM_ERROR("connector %s leaked!\n", connector->name);
drm_connector_list_iter_put(&conn_iter);
}
list_for_each_entry_safe(property, pt, &dev->mode_config.property_list,
head) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册