提交 4894bf71 编写于 作者: G Gustavo Padovan

drm/vc4: use drm_for_each_connector_iter()

Drop legacy drm_for_each_connector() in favor of the race-free
drm_for_each_connector_iter().

v2: add missing drm_connector_list_iter_end(Daniel Vetter)

Cc: Eric Anholt <eric@anholt.net>
Signed-off-by: NGustavo Padovan <gustavo.padovan@collabora.com>
Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
Acked-by: NEric Anholt <eric@anholt.net>
Link: http://patchwork.freedesktop.org/patch/msgid/20170512164100.7649-1-gustavo@padovan.org
上级 875dd626
......@@ -345,12 +345,16 @@ static u32 vc4_get_fifo_full_level(u32 format)
static struct drm_encoder *vc4_get_crtc_encoder(struct drm_crtc *crtc)
{
struct drm_connector *connector;
struct drm_connector_list_iter conn_iter;
drm_for_each_connector(connector, crtc->dev) {
drm_connector_list_iter_begin(crtc->dev, &conn_iter);
drm_for_each_connector_iter(connector, &conn_iter) {
if (connector->state->crtc == crtc) {
drm_connector_list_iter_end(&conn_iter);
return connector->encoder;
}
}
drm_connector_list_iter_end(&conn_iter);
return NULL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册