[PATCH 00/11] [RFC] drm_for_each_* macros and list locking

Daniel Vetter daniel.vetter at ffwll.ch
Tue Jun 23 13:45:51 PDT 2015


Hi all,

Dave&I have been discussing connector hotplug and unplugging around DP MST and
if there's one thing that's clear it's that we don't even really know where all
the problems are. Hence first step is to figure that out. One of the bigger
items is walking the encoder/connector lists without appropriate locking to
protect against concurrent hotadd/removal of connectors.

This patch series tries to untangle things a bit here. RFC since only lightly
tested and missing conversion of the radoen mst code to the new locking scheme.
I think rolling out the new macros for i915 should be done as a second step, to
avoid hitting too many WARN_ON ;-)

Cheers, Daniel

Daniel Vetter (11):
  drm: Simplify drm_for_each_legacy_plane arguments
  drm: Add modeset object iterators
  drm/probe-helper: Grab mode_config.mutex in poll_init/enable
  drm/fbdev-helper: Grab mode_config.mutex in
    drm_fb_helper_single_add_all_connectors
  drm: Check locking in drm_for_each_encoder/connector
  drm/i915: Use drm_for_each_fb in i915_debugfs.c
  drm: Check locking in drm_for_each_fb
  drm/i915: Take all modeset locks for DP MST hotplug
  drm: Amend connector/encoder list locking rules
  drm: Roll out drm_for_each_connector more
  drm: Roll out drm_for_each_{plane,crtc,encoder}

 drivers/gpu/drm/drm_atomic.c              |  2 +-
 drivers/gpu/drm/drm_atomic_helper.c       |  4 +--
 drivers/gpu/drm/drm_crtc.c                | 56 +++++++++++++++----------------
 drivers/gpu/drm/drm_crtc_helper.c         | 42 +++++++++++------------
 drivers/gpu/drm/drm_edid.c                |  2 +-
 drivers/gpu/drm/drm_fb_cma_helper.c       |  2 +-
 drivers/gpu/drm/drm_fb_helper.c           | 19 +++++++----
 drivers/gpu/drm/drm_modeset_lock.c        |  7 ++--
 drivers/gpu/drm/drm_of.c                  |  2 +-
 drivers/gpu/drm/drm_plane_helper.c        |  3 +-
 drivers/gpu/drm/drm_probe_helper.c        | 45 +++++++++++++++----------
 drivers/gpu/drm/i915/i915_debugfs.c       |  4 ++-
 drivers/gpu/drm/i915/intel_dp_mst.c       | 12 +++----
 drivers/gpu/drm/i915/intel_pm.c           |  2 +-
 drivers/gpu/drm/shmobile/shmob_drm_crtc.c |  2 +-
 include/drm/drm_crtc.h                    | 33 ++++++++++++++++--
 16 files changed, 140 insertions(+), 97 deletions(-)

-- 
2.1.4



More information about the dri-devel mailing list