Commit 347e8903 authored by Daniel Vetter's avatar Daniel Vetter

drm: Nuke connector_list locking assert

I've forgotten to remove this when revamping the
connector_list locking.

Cc: seanpaul@chromium.org
Reviewed-by: default avatarDavid Herrmann <dh.herrmann@gmail.com>
Reviewed-by: default avatarSean Paul <seanpaul@chromium.org>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1483044517-5770-7-git-send-email-daniel.vetter@ffwll.ch
parent ea0dd85a
...@@ -875,11 +875,7 @@ void drm_mode_put_tile_group(struct drm_device *dev, ...@@ -875,11 +875,7 @@ void drm_mode_put_tile_group(struct drm_device *dev,
* deprecated. Use drm_for_each_connector_iter() instead. * deprecated. Use drm_for_each_connector_iter() instead.
*/ */
#define drm_for_each_connector(connector, dev) \ #define drm_for_each_connector(connector, dev) \
for (assert_drm_connector_list_read_locked(&(dev)->mode_config), \ list_for_each_entry(connector, &(dev)->mode_config.connector_list, head)
connector = list_first_entry(&(dev)->mode_config.connector_list, \
struct drm_connector, head); \
&connector->head != (&(dev)->mode_config.connector_list); \
connector = list_next_entry(connector, head))
/** /**
* struct drm_connector_list_iter - connector_list iterator * struct drm_connector_list_iter - connector_list iterator
......
...@@ -836,18 +836,4 @@ static inline struct drm_crtc *drm_crtc_find(struct drm_device *dev, ...@@ -836,18 +836,4 @@ static inline struct drm_crtc *drm_crtc_find(struct drm_device *dev,
#define drm_for_each_crtc(crtc, dev) \ #define drm_for_each_crtc(crtc, dev) \
list_for_each_entry(crtc, &(dev)->mode_config.crtc_list, head) list_for_each_entry(crtc, &(dev)->mode_config.crtc_list, head)
static inline void
assert_drm_connector_list_read_locked(struct drm_mode_config *mode_config)
{
/*
* The connector hotadd/remove code currently grabs both locks when
* updating lists. Hence readers need only hold either of them to be
* safe and the check amounts to
*
* WARN_ON(not_holding(A) && not_holding(B)).
*/
WARN_ON(!mutex_is_locked(&mode_config->mutex) &&
!drm_modeset_is_locked(&mode_config->connection_mutex));
}
#endif /* __DRM_CRTC_H__ */ #endif /* __DRM_CRTC_H__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment