Skip to content

Commit

Permalink
drm/nouveau: use drm_for_each_connector_iter()
Browse files Browse the repository at this point in the history
Drop legacy drm_for_each_connector() in favor of the race-free
drm_for_each_connector_iter().

Cc: Ben Skeggs <[email protected]>
Signed-off-by: Gustavo Padovan <[email protected]>
Reviewed-by: Daniel Vetter <[email protected]>
Link: http://patchwork.freedesktop.org/patch/msgid/[email protected]
  • Loading branch information
padovan committed May 26, 2017
1 parent c8bf8b9 commit 875dd62
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/gpu/drm/nouveau/nv50_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -2872,17 +2872,20 @@ nv50_msto_enable(struct drm_encoder *encoder)
struct nv50_mstc *mstc = NULL;
struct nv50_mstm *mstm = NULL;
struct drm_connector *connector;
struct drm_connector_list_iter conn_iter;
u8 proto, depth;
int slots;
bool r;

drm_for_each_connector(connector, encoder->dev) {
drm_connector_list_iter_begin(encoder->dev, &conn_iter);
drm_for_each_connector_iter(connector, &conn_iter) {
if (connector->state->best_encoder == &msto->encoder) {
mstc = nv50_mstc(connector);
mstm = mstc->mstm;
break;
}
}
drm_connector_list_iter_end(&conn_iter);

if (WARN_ON(!mstc))
return;
Expand Down

0 comments on commit 875dd62

Please sign in to comment.