On Wed, Jun 09, 2021 at 11:56:27AM +0300, Ville Syrjala wrote: > From: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> > > Use drm_crtc_mask() instead of hand rolling it. > > Signed-off-by: Ville Syrjälä <ville.syrjala@xxxxxxxxxxxxxxx> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@xxxxxxxxx> > --- > drivers/gpu/drm/i915/display/intel_display.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c > index 362bff9beb5c..62ad4cfae073 100644 > --- a/drivers/gpu/drm/i915/display/intel_display.c > +++ b/drivers/gpu/drm/i915/display/intel_display.c > @@ -6485,7 +6485,7 @@ int intel_get_load_detect_pipe(struct drm_connector *connector, > struct drm_atomic_state *state = NULL, *restore_state = NULL; > struct drm_connector_state *connector_state; > struct intel_crtc_state *crtc_state; > - int ret, i = -1; > + int ret; > > drm_dbg_kms(&dev_priv->drm, "[CONNECTOR:%d:%s], [ENCODER:%d:%s]\n", > connector->base.id, connector->name, > @@ -6519,8 +6519,7 @@ int intel_get_load_detect_pipe(struct drm_connector *connector, > > /* Find an unused one (if possible) */ > for_each_crtc(dev, possible_crtc) { > - i++; > - if (!(encoder->possible_crtcs & (1 << i))) > + if (!(encoder->possible_crtcs & drm_crtc_mask(possible_crtc))) > continue; > > ret = drm_modeset_lock(&possible_crtc->mutex, ctx); > -- > 2.31.1 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@xxxxxxxxxxxxxxxxxxxxx > https://lists.freedesktop.org/mailman/listinfo/intel-gfx _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx