drm/atomic: Extract needs_modeset function
We use the same check already in the atomic core, so might as well make this official. And it's also reused in e.g. i915. Motivated by Maarten's idea to extract a connector_changed state out of mode_changed. Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-By: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
This commit is contained in:
@@ -1216,8 +1216,7 @@ int drm_atomic_check_only(struct drm_atomic_state *state)
|
||||
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user