diff options
author | Gustavo Padovan <gustavo.padovan@collabora.com> | 2017-05-15 16:43:30 +0300 |
---|---|---|
committer | Gustavo Padovan <gustavo.padovan@collabora.com> | 2017-05-26 08:04:54 +0300 |
commit | 2cbeb64f6c709de67e2ba5b97ff45d2b6147b286 (patch) | |
tree | 8702bd0daefb2cc8a5205fc3dcd98da4e2acf91a /drivers/gpu/drm | |
parent | 48a92916729bd0ed6bc1d938557cd3779a0657fd (diff) | |
download | linux-2cbeb64f6c709de67e2ba5b97ff45d2b6147b286.tar.xz |
drm/rockchip: use drm_for_each_connector_iter()
Drop legacy drm_for_each_connector() in favor of the race-free
drm_for_each_connector_iter()
Cc: Mark Yao <mark.yao@rock-chips.com>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/20170515134330.3275-1-gustavo@padovan.org
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r-- | drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index 40a5e6ef6f2c..9b3525a36969 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c @@ -1118,16 +1118,17 @@ static void vop_crtc_destroy_state(struct drm_crtc *crtc, #ifdef CONFIG_DRM_ANALOGIX_DP static struct drm_connector *vop_get_edp_connector(struct vop *vop) { - struct drm_crtc *crtc = &vop->crtc; struct drm_connector *connector; + struct drm_connector_list_iter conn_iter; - mutex_lock(&crtc->dev->mode_config.mutex); - drm_for_each_connector(connector, crtc->dev) + drm_connector_list_iter_begin(vop->drm_dev, &conn_iter); + drm_for_each_connector_iter(connector, &conn_iter) { if (connector->connector_type == DRM_MODE_CONNECTOR_eDP) { - mutex_unlock(&crtc->dev->mode_config.mutex); + drm_connector_list_iter_end(&conn_iter); return connector; } - mutex_unlock(&crtc->dev->mode_config.mutex); + } + drm_connector_list_iter_end(&conn_iter); return NULL; } |