]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Check locking in drm_for_each_connector
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 9 Jul 2015 21:44:28 +0000 (23:44 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 22 Jul 2015 14:25:46 +0000 (16:25 +0200)
commitadb0550a31ad980d538ad3368a7300da12f0da3d
treea2c59c481e7969826badf3570dcfe5ad3b6d7573
parent4beeb43e8e60e82e5a5634e5dd3a8fc0c51abfca
drm: Check locking in drm_for_each_connector

Because of DP MST connectors can now be hotplugged and we must hold
the right lock when walking the connector lists.  Enforce this by
checking the locking in our shiny new list walking macros.

v2: Extract the locking check into a small static inline helper to
help readability. This will be more important when we make the
read list access rules more complicated in later patches. Inspired by
comments from Chris. Unfortunately, due to header loops around the
definition of struct drm_device the function interface is a bit funny.

v3: Encoders aren't hotadded/removed. For each dp mst encoder we
statically create one fake encoder per pipe so that we can support as
many mst sinks as the hw can (Dave).

Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Dave Airlie <airlied@redhat.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
include/drm/drm_crtc.h