diff options
author | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2017-04-06 13:19:01 +0200 |
---|---|---|
committer | Sean Paul <seanpaul@chromium.org> | 2017-04-06 23:00:27 +0200 |
commit | 24d6652c1508ccb530726ad8065de92ac31f2449 (patch) | |
tree | 1e9f60ba9f370d33886ca8c777882af370bc3c9e /drivers/gpu/drm/drm_atomic_helper.c | |
parent | drm/atomic: Unify conflicting encoder handling. (diff) | |
download | linux-24d6652c1508ccb530726ad8065de92ac31f2449.tar.xz linux-24d6652c1508ccb530726ad8065de92ac31f2449.zip |
drm/atomic: Set all the changed flags in one place.
Now that handle_conflicting_encoders cannot disable crtc's any more
it makes sense to set all the changed flags in 1 place.
This makes the code slightly less magical.
The (now removed) comment is out of date. The only reason the
active_changed was set late was because handle_conflicting_encoders
could disable connectors. This is no longer the case,
and we can put everything in 1 place.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1491477543-31257-3-git-send-email-maarten.lankhorst@linux.intel.com
Diffstat (limited to 'drivers/gpu/drm/drm_atomic_helper.c')
-rw-r--r-- | drivers/gpu/drm/drm_atomic_helper.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index 37a7fc7649a4..2d506820285f 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c @@ -515,6 +515,12 @@ drm_atomic_helper_check_modeset(struct drm_device *dev, new_crtc_state->mode_changed = true; new_crtc_state->connectors_changed = true; } + + if (old_crtc_state->active != new_crtc_state->active) { + DRM_DEBUG_ATOMIC("[CRTC:%d:%s] active changed\n", + crtc->base.id, crtc->name); + new_crtc_state->active_changed = true; + } } ret = handle_conflicting_encoders(state, false); @@ -551,17 +557,6 @@ drm_atomic_helper_check_modeset(struct drm_device *dev, bool has_connectors = !!new_crtc_state->connector_mask; - /* - * We must set ->active_changed after walking connectors for - * otherwise an update that only changes active would result in - * a full modeset because update_connector_routing force that. - */ - if (old_crtc_state->active != new_crtc_state->active) { - DRM_DEBUG_ATOMIC("[CRTC:%d:%s] active changed\n", - crtc->base.id, crtc->name); - new_crtc_state->active_changed = true; - } - if (!drm_atomic_crtc_needs_modeset(new_crtc_state)) continue; |