Commit f015c551 authored by Ville Syrjälä's avatar Ville Syrjälä Committed by Daniel Vetter

drm/i915: Split atomic wm update to pre and post variants

Try to update the watermarks on the right side of the plane update. This
is just a temporary hack until we get the proper two part update into
place. However in the meantime this might have some chance of at least
working.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: default avatarClint Taylor <Clinton.A.Taylor@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent a7a6c498
...@@ -4722,6 +4722,9 @@ static void intel_post_plane_update(struct intel_crtc *crtc) ...@@ -4722,6 +4722,9 @@ static void intel_post_plane_update(struct intel_crtc *crtc)
intel_frontbuffer_flip(dev, atomic->fb_bits); intel_frontbuffer_flip(dev, atomic->fb_bits);
if (crtc->atomic.update_wm_post)
intel_update_watermarks(&crtc->base);
if (atomic->update_fbc) { if (atomic->update_fbc) {
mutex_lock(&dev->struct_mutex); mutex_lock(&dev->struct_mutex);
intel_fbc_update(dev); intel_fbc_update(dev);
...@@ -11606,8 +11609,12 @@ int intel_plane_atomic_calc_changes(struct drm_crtc_state *crtc_state, ...@@ -11606,8 +11609,12 @@ int intel_plane_atomic_calc_changes(struct drm_crtc_state *crtc_state,
plane->base.id, was_visible, visible, plane->base.id, was_visible, visible,
turn_off, turn_on, mode_changed); turn_off, turn_on, mode_changed);
if (intel_wm_need_update(plane, plane_state)) if (turn_on)
intel_crtc->atomic.update_wm = true; intel_crtc->atomic.update_wm_pre = true;
else if (turn_off)
intel_crtc->atomic.update_wm_post = true;
else if (intel_wm_need_update(plane, plane_state))
intel_crtc->atomic.update_wm_pre = true;
if (visible) if (visible)
intel_crtc->atomic.fb_bits |= intel_crtc->atomic.fb_bits |=
...@@ -11776,7 +11783,7 @@ static int intel_crtc_atomic_check(struct drm_crtc *crtc, ...@@ -11776,7 +11783,7 @@ static int intel_crtc_atomic_check(struct drm_crtc *crtc,
intel_crtc_check_initial_planes(crtc, crtc_state); intel_crtc_check_initial_planes(crtc, crtc_state);
if (mode_changed) if (mode_changed)
intel_crtc->atomic.update_wm = !crtc_state->active; intel_crtc->atomic.update_wm_post = !crtc_state->active;
if (mode_changed && crtc_state->enable && if (mode_changed && crtc_state->enable &&
dev_priv->display.crtc_compute_clock && dev_priv->display.crtc_compute_clock &&
...@@ -13705,7 +13712,7 @@ static void intel_begin_crtc_commit(struct drm_crtc *crtc) ...@@ -13705,7 +13712,7 @@ static void intel_begin_crtc_commit(struct drm_crtc *crtc)
if (!needs_modeset(crtc->state)) if (!needs_modeset(crtc->state))
intel_pre_plane_update(intel_crtc); intel_pre_plane_update(intel_crtc);
if (intel_crtc->atomic.update_wm) if (intel_crtc->atomic.update_wm_pre)
intel_update_watermarks(crtc); intel_update_watermarks(crtc);
intel_runtime_pm_get(dev_priv); intel_runtime_pm_get(dev_priv);
......
...@@ -500,7 +500,7 @@ struct intel_crtc_atomic_commit { ...@@ -500,7 +500,7 @@ struct intel_crtc_atomic_commit {
bool disable_fbc; bool disable_fbc;
bool disable_ips; bool disable_ips;
bool pre_disable_primary; bool pre_disable_primary;
bool update_wm; bool update_wm_pre, update_wm_post;
unsigned disabled_planes; unsigned disabled_planes;
/* Sleepable operations to perform after commit */ /* Sleepable operations to perform after commit */
......
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