On Wed, Feb 24, 2016 at 09:37:33AM +0100, Maarten Lankhorst wrote: > Now that only encoders can be stolen that are part of the state > steal_encoder no longer needs to inspect all connectors, > just those that are part of the atomic state. steal_encoder() can no longer fail after this, so should clean up the caller a bit too I think. > > Signed-off-by: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx> > --- > drivers/gpu/drm/drm_atomic_helper.c | 11 ++--------- > 1 file changed, 2 insertions(+), 9 deletions(-) > > diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c > index 32bd5bebef0b..0fc56339001d 100644 > --- a/drivers/gpu/drm/drm_atomic_helper.c > +++ b/drivers/gpu/drm/drm_atomic_helper.c > @@ -215,18 +215,11 @@ steal_encoder(struct drm_atomic_state *state, > struct drm_crtc_state *crtc_state; > struct drm_connector *connector; > struct drm_connector_state *connector_state; > + int i; > > - drm_for_each_connector(connector, state->dev) { > + for_each_connector_in_state(state, connector, connector_state, i) { > struct drm_crtc *encoder_crtc; > > - if (connector->state->best_encoder != encoder) > - continue; > - > - connector_state = drm_atomic_get_connector_state(state, > - connector); > - if (IS_ERR(connector_state)) > - return PTR_ERR(connector_state); > - > if (connector_state->best_encoder != encoder || > WARN_ON(!connector_state->crtc)) > continue; > -- > 2.1.0 > > _______________________________________________ > dri-devel mailing list > dri-devel@xxxxxxxxxxxxxxxxxxxxx > https://lists.freedesktop.org/mailman/listinfo/dri-devel -- Ville Syrjälä Intel OTC _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx