summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_mode_config.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2017-12-19 14:37:24 +0300
committerDave Airlie <airlied@redhat.com>2017-12-19 14:37:24 +0300
commit6b7dcb536e3535444c39286333f10d06d2f44fb5 (patch)
tree6a4c1e30e5900626e506d46b100d21a2fcd59003 /drivers/gpu/drm/drm_mode_config.c
parenta942b3c2cddc4378482a427845d15c78eb50f4d4 (diff)
parent1291a0d5049dbc06baaaf66a9ff3f53db493b19b (diff)
downloadlinux-6b7dcb536e3535444c39286333f10d06d2f44fb5.tar.xz
BackMerge tag 'v4.15-rc4' into drm-next
Linux 4.15-rc4 Daniel requested it to fix some messy conflicts.
Diffstat (limited to 'drivers/gpu/drm/drm_mode_config.c')
-rw-r--r--drivers/gpu/drm/drm_mode_config.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_mode_config.c b/drivers/gpu/drm/drm_mode_config.c
index bc5c46306b3d..e5c653357024 100644
--- a/drivers/gpu/drm/drm_mode_config.c
+++ b/drivers/gpu/drm/drm_mode_config.c
@@ -382,6 +382,9 @@ void drm_mode_config_init(struct drm_device *dev)
ida_init(&dev->mode_config.connector_ida);
spin_lock_init(&dev->mode_config.connector_list_lock);
+ init_llist_head(&dev->mode_config.connector_free_list);
+ INIT_WORK(&dev->mode_config.connector_free_work, drm_connector_free_work_fn);
+
drm_mode_create_standard_properties(dev);
/* Just to be sure */
@@ -431,6 +434,8 @@ void drm_mode_config_cleanup(struct drm_device *dev)
drm_connector_put(connector);
}
drm_connector_list_iter_end(&conn_iter);
+ /* connector_iter drops references in a work item. */
+ flush_work(&dev->mode_config.connector_free_work);
if (WARN_ON(!list_empty(&dev->mode_config.connector_list))) {
drm_connector_list_iter_begin(dev, &conn_iter);
drm_for_each_connector_iter(connector, &conn_iter)