Commit af4a879e authored by Daniel Vetter's avatar Daniel Vetter

drm/i915: Simplify control flow in intel_atomic_check a bit.

- Unconditionally add plane states. Core helpers would have done this
  in drm_atomic_helper_check_modeset, doing it once more won't cause
  harm and is less fragile.

- Simplify the continue logic when disabling a pipe.

Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1462779085-2458-1-git-send-email-daniel.vetter@ffwll.ch
parent 1ecc1c6c
...@@ -13351,15 +13351,14 @@ static int intel_atomic_check(struct drm_device *dev, ...@@ -13351,15 +13351,14 @@ static int intel_atomic_check(struct drm_device *dev,
if (crtc_state->mode.private_flags != crtc->state->mode.private_flags) if (crtc_state->mode.private_flags != crtc->state->mode.private_flags)
crtc_state->mode_changed = true; crtc_state->mode_changed = true;
if (!needs_modeset(crtc_state))
continue;
if (!crtc_state->enable) { if (!crtc_state->enable) {
if (needs_modeset(crtc_state))
any_ms = true; any_ms = true;
continue; continue;
} }
if (!needs_modeset(crtc_state))
continue;
/* FIXME: For only active_changed we shouldn't need to do any /* FIXME: For only active_changed we shouldn't need to do any
* state recomputation at all. */ * state recomputation at all. */
...@@ -13382,13 +13381,12 @@ static int intel_atomic_check(struct drm_device *dev, ...@@ -13382,13 +13381,12 @@ static int intel_atomic_check(struct drm_device *dev,
to_intel_crtc_state(crtc_state)->update_pipe = true; to_intel_crtc_state(crtc_state)->update_pipe = true;
} }
if (needs_modeset(crtc_state)) { if (needs_modeset(crtc_state))
any_ms = true; any_ms = true;
ret = drm_atomic_add_affected_planes(state, crtc); ret = drm_atomic_add_affected_planes(state, crtc);
if (ret) if (ret)
return 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) ?
......
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