if (!state->allow_modeset) {
                for_each_crtc_in_state(state, crtc, crtc_state, i) {
-                       if (crtc_state->mode_changed ||
-                           crtc_state->active_changed) {
+                       if (drm_atomic_crtc_needs_modeset(crtc_state)) {
                                DRM_DEBUG_ATOMIC("[CRTC:%d] requires full modeset\n",
                                                 crtc->base.id);
                                return -EINVAL;
 
        return 0;
 }
 
-static bool
-needs_modeset(struct drm_crtc_state *state)
-{
-       return state->mode_changed || state->active_changed;
-}
-
 /**
  * drm_atomic_helper_check_modeset - validate state object for modeset changes
  * @dev: DRM device
                        crtc_state->active_changed = true;
                }
 
-               if (!needs_modeset(crtc_state))
+               if (!drm_atomic_crtc_needs_modeset(crtc_state))
                        continue;
 
                DRM_DEBUG_ATOMIC("[CRTC:%d] needs all connectors, enable: %c, active: %c\n",
                old_crtc_state = old_state->crtc_states[drm_crtc_index(old_conn_state->crtc)];
 
                if (!old_crtc_state->active ||
-                   !needs_modeset(old_conn_state->crtc->state))
+                   !drm_atomic_crtc_needs_modeset(old_conn_state->crtc->state))
                        continue;
 
                encoder = old_conn_state->best_encoder;
                const struct drm_crtc_helper_funcs *funcs;
 
                /* Shut down everything that needs a full modeset. */
-               if (!needs_modeset(crtc->state))
+               if (!drm_atomic_crtc_needs_modeset(crtc->state))
                        continue;
 
                if (!old_crtc_state->active)
                const struct drm_crtc_helper_funcs *funcs;
 
                /* Need to filter out CRTCs where only planes change. */
-               if (!needs_modeset(crtc->state))
+               if (!drm_atomic_crtc_needs_modeset(crtc->state))
                        continue;
 
                if (!crtc->state->active)
                        continue;
 
                if (!connector->state->crtc->state->active ||
-                   !needs_modeset(connector->state->crtc->state))
+                   !drm_atomic_crtc_needs_modeset(connector->state->crtc->state))
                        continue;
 
                encoder = connector->state->best_encoder;