Commit 8c58f73c authored by Maarten Lankhorst's avatar Maarten Lankhorst Committed by Lyude Paul

drm/i915: Check for I915_MODE_FLAG_INHERITED before drm_atomic_helper_check_modeset

Moving the check upwards will mean we we no longer have to add planes
and connectors manually, because everything is handled correctly by
drm_atomic_helper_check_modeset() as intended.

[applied with whitespace changes to make sparse happy]
Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Lyude Paul <lyude@redhat.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: default avatarLyude Paul <lyude@redhat.com>
Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180221092808.30060-1-maarten.lankhorst@linux.intel.com
parent ffed7bd2
...@@ -12050,6 +12050,14 @@ static int intel_atomic_check(struct drm_device *dev, ...@@ -12050,6 +12050,14 @@ static int intel_atomic_check(struct drm_device *dev,
int ret, i; int ret, i;
bool any_ms = false; bool any_ms = false;
/* Catch I915_MODE_FLAG_INHERITED */
for_each_oldnew_crtc_in_state(state, crtc, old_crtc_state,
crtc_state, i) {
if (crtc_state->mode.private_flags !=
old_crtc_state->mode.private_flags)
crtc_state->mode_changed = true;
}
ret = drm_atomic_helper_check_modeset(dev, state); ret = drm_atomic_helper_check_modeset(dev, state);
if (ret) if (ret)
return ret; return ret;
...@@ -12058,10 +12066,6 @@ static int intel_atomic_check(struct drm_device *dev, ...@@ -12058,10 +12066,6 @@ static int intel_atomic_check(struct drm_device *dev,
struct intel_crtc_state *pipe_config = struct intel_crtc_state *pipe_config =
to_intel_crtc_state(crtc_state); to_intel_crtc_state(crtc_state);
/* Catch I915_MODE_FLAG_INHERITED */
if (crtc_state->mode.private_flags != old_crtc_state->mode.private_flags)
crtc_state->mode_changed = true;
if (!needs_modeset(crtc_state)) if (!needs_modeset(crtc_state))
continue; continue;
...@@ -12070,13 +12074,6 @@ static int intel_atomic_check(struct drm_device *dev, ...@@ -12070,13 +12074,6 @@ static int intel_atomic_check(struct drm_device *dev,
continue; continue;
} }
/* FIXME: For only active_changed we shouldn't need to do any
* state recomputation at all. */
ret = drm_atomic_add_affected_connectors(state, crtc);
if (ret)
return ret;
ret = intel_modeset_pipe_config(crtc, pipe_config); ret = intel_modeset_pipe_config(crtc, pipe_config);
if (ret) { if (ret) {
intel_dump_pipe_config(to_intel_crtc(crtc), intel_dump_pipe_config(to_intel_crtc(crtc),
...@@ -12095,10 +12092,6 @@ static int intel_atomic_check(struct drm_device *dev, ...@@ -12095,10 +12092,6 @@ static int intel_atomic_check(struct drm_device *dev,
if (needs_modeset(crtc_state)) if (needs_modeset(crtc_state))
any_ms = true; any_ms = true;
ret = drm_atomic_add_affected_planes(state, crtc);
if (ret)
return ret;
intel_dump_pipe_config(to_intel_crtc(crtc), pipe_config, intel_dump_pipe_config(to_intel_crtc(crtc), pipe_config,
needs_modeset(crtc_state) ? needs_modeset(crtc_state) ?
"[modeset]" : "[fastset]"); "[modeset]" : "[fastset]");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment