summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_atomic_helper.c
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2017-04-06 14:19:00 +0300
committerSean Paul <seanpaul@chromium.org>2017-04-07 00:00:27 +0300
commit44596b8c4750d9a2323f52aecdeecf34f6aaa2e0 (patch)
tree5bc79c7aead5a5755417736ed3a18a6575a9df33 /drivers/gpu/drm/drm_atomic_helper.c
parent53552d5df6694f68f276b2e86f8162d0ef7cad93 (diff)
downloadlinux-44596b8c4750d9a2323f52aecdeecf34f6aaa2e0.tar.xz
drm/atomic: Unify conflicting encoder handling.
Currently we use a flag to change behavior in atomic commit whether a conflicting encoder should be enabled or disabled. This is used for the legacy set_config helper, which disables connectors that have a conflicting encoder but not part of the active crtc list. There's no need for this to be handled in atomic commit, it could be done in the set_config helper instead. This will let the atomic check function reject any conflicting encoders, while set_config can disable conflicting crtc's. This makes it possible to recalculate the changed flags in 1 loop. 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-2-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.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index a90d67b6310b..37a7fc7649a4 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -517,7 +517,7 @@ drm_atomic_helper_check_modeset(struct drm_device *dev,
}
}
- ret = handle_conflicting_encoders(state, state->legacy_set_config);
+ ret = handle_conflicting_encoders(state, false);
if (ret)
return ret;
@@ -2289,12 +2289,15 @@ int drm_atomic_helper_set_config(struct drm_mode_set *set,
if (!state)
return -ENOMEM;
- state->legacy_set_config = true;
state->acquire_ctx = ctx;
ret = __drm_atomic_helper_set_config(set, state);
if (ret != 0)
goto fail;
+ ret = handle_conflicting_encoders(state, true);
+ if (ret)
+ return ret;
+
ret = drm_atomic_commit(state);
fail: