Hi all, I finally clued up about connector_list locking and here is a fix for that little issue that's not totally horribly nightmare fuel. As usual I ended up reading too much other code, so there's a few random bits in here too. Some of the earlier randomness I submitted already and it's in drm-misc by now. Anyway, core is all fixed up (and lost 2 FIXME and all unprotected connector_list walkers). Helpers are converted (again all of it), plus i915 as an example. Well, not all: The ones in intel_display.c look like (at least some) that they should instead walk the connectors in some atomic update. An I just couldn't be bothered to change the code in intel_sdvo.c since meh. Otherwise all the existing connector_list walkers (whether drm_for_each_connector, for_each_intel_connector or raw walk) are now all connected. Seems to not immediately blow up, and even after a few nights of sleep I still think this is correct. Kerneldoc is also polished and updated. Feedback and review highly welcome. Cheers, Daniel Daniel Vetter (13): drm/irq: drm_legacy_ prefix for legacy ioctls drm: Move atomic debugfs functions into drm_crtc_internal.h drm/radeon|amdgpu: Remove redundant num_connectors check drm: Drop locking cargo-cult from drm_mode_config_init drm: locking&new iterators for connector_list drm: Convert all helpers to drm_connector_list_iter drm: Clean up connectors by unreferencing them drm: prevent double-(un)registration for connectors drm: Tighten locking in drm_mode_getconnector drm/i915: Use drm_connector_list_iter in debugfs drm/i915: use drm_connector_list_iter in intel_hotplug.c drm/i915: use drm_connector_list_iter in intel_opregion.c drm/i915: Make intel_get_pipe_from_connector atomic drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 6 +- drivers/gpu/drm/drm_atomic.c | 14 +- drivers/gpu/drm/drm_atomic_helper.c | 39 ++++-- drivers/gpu/drm/drm_connector.c | 226 ++++++++++++++++++++++---------- drivers/gpu/drm/drm_crtc_helper.c | 49 +++++-- drivers/gpu/drm/drm_crtc_internal.h | 6 + drivers/gpu/drm/drm_debugfs.c | 1 + drivers/gpu/drm/drm_encoder.c | 6 +- drivers/gpu/drm/drm_fb_helper.c | 12 +- drivers/gpu/drm/drm_internal.h | 8 +- drivers/gpu/drm/drm_ioctl.c | 4 +- drivers/gpu/drm/drm_irq.c | 30 +---- drivers/gpu/drm/drm_mode_config.c | 51 +++---- drivers/gpu/drm/drm_modeset_helper.c | 2 + drivers/gpu/drm/drm_plane_helper.c | 5 +- drivers/gpu/drm/drm_probe_helper.c | 18 ++- drivers/gpu/drm/i915/i915_debugfs.c | 62 ++++++--- drivers/gpu/drm/i915/i915_drv.h | 3 + drivers/gpu/drm/i915/intel_display.c | 5 +- drivers/gpu/drm/i915/intel_hotplug.c | 28 ++-- drivers/gpu/drm/i915/intel_opregion.c | 15 ++- drivers/gpu/drm/radeon/radeon_irq_kms.c | 12 +- include/drm/drm_atomic.h | 6 - include/drm/drm_connector.h | 73 ++++++++++- include/drm/drm_mode_config.h | 12 +- 25 files changed, 466 insertions(+), 227 deletions(-) -- 2.11.0 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel