On Wed, May 13, 2026 at 10:58:36AM +0300, Jani Nikula wrote: > intel_has_pending_fb_unpin() has the last direct user of > drm_for_each_crtc() in i915. Switch to for_each_intel_crtc() to ensure > pipe order iteration in all cases. > > Signed-off-by: Jani Nikula <[email protected]>
The order doesn't actually matter here, but no reason do things differently just in this one case. Reviewed-by: Ville Syrjälä <[email protected]> > --- > drivers/gpu/drm/i915/display/intel_display.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_display.c > b/drivers/gpu/drm/i915/display/intel_display.c > index 50feca52b962..682a0514ec81 100644 > --- a/drivers/gpu/drm/i915/display/intel_display.c > +++ b/drivers/gpu/drm/i915/display/intel_display.c > @@ -714,22 +714,22 @@ static void icl_set_pipe_chicken(const struct > intel_crtc_state *crtc_state) > > bool intel_has_pending_fb_unpin(struct intel_display *display) > { > - struct drm_crtc *crtc; > + struct intel_crtc *crtc; > bool cleanup_done; > > - drm_for_each_crtc(crtc, display->drm) { > + for_each_intel_crtc(display->drm, crtc) { > struct drm_crtc_commit *commit; > - spin_lock(&crtc->commit_lock); > - commit = list_first_entry_or_null(&crtc->commit_list, > + spin_lock(&crtc->base.commit_lock); > + commit = list_first_entry_or_null(&crtc->base.commit_list, > struct drm_crtc_commit, > commit_entry); > cleanup_done = commit ? > try_wait_for_completion(&commit->cleanup_done) : true; > - spin_unlock(&crtc->commit_lock); > + spin_unlock(&crtc->base.commit_lock); > > if (cleanup_done) > continue; > > - intel_crtc_wait_for_next_vblank(to_intel_crtc(crtc)); > + intel_crtc_wait_for_next_vblank(crtc); > > return true; > } > -- > 2.47.3 -- Ville Syrjälä Intel
