Commit fd255f6e authored by Dhinakaran Pandiyan's avatar Dhinakaran Pandiyan

drm/i915/psr: Remove wait_for_idle() for PSR2

CI runs show PSR2 does not go to IDLE with selective update enabled on
all PSR exit triggers. Specifically, logs indicate the hardware enters
"SLEEP Selective Update" and not "IDLE Reset state', like the kernel
expects, when vblank interrupts are enabled. This check was added for PSR1
but incorrectly extended to PSR2, remove the check as it breaks tests
and prints out misleading error messages.

v2: Split out non-code changes (Rodrigo)

Cc: Tarun Vyas <tarun.vyas@intel.com>
Cc: José Roberto de Souza <jose.souza@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Fixes: c43dbcbb ("drm/i915/psr: Lockless version of psr_wait_for_idle")
Signed-off-by: default avatarDhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180824230844.12428-1-dhinakaran.pandiyan@intel.com
parent 3cf71bc9
...@@ -771,8 +771,6 @@ int intel_psr_wait_for_idle(const struct intel_crtc_state *new_crtc_state, ...@@ -771,8 +771,6 @@ int intel_psr_wait_for_idle(const struct intel_crtc_state *new_crtc_state,
{ {
struct intel_crtc *crtc = to_intel_crtc(new_crtc_state->base.crtc); struct intel_crtc *crtc = to_intel_crtc(new_crtc_state->base.crtc);
struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
i915_reg_t reg;
u32 mask;
if (!dev_priv->psr.enabled || !new_crtc_state->has_psr) if (!dev_priv->psr.enabled || !new_crtc_state->has_psr)
return 0; return 0;
...@@ -787,13 +785,10 @@ int intel_psr_wait_for_idle(const struct intel_crtc_state *new_crtc_state, ...@@ -787,13 +785,10 @@ int intel_psr_wait_for_idle(const struct intel_crtc_state *new_crtc_state,
* not needed and will induce latencies in the atomic * not needed and will induce latencies in the atomic
* update path. * update path.
*/ */
if (dev_priv->psr.psr2_enabled) {
reg = EDP_PSR2_STATUS; /* FIXME: Update this for PSR2 if we need to wait for idle */
mask = EDP_PSR2_STATUS_STATE_MASK; if (READ_ONCE(dev_priv->psr.psr2_enabled))
} else { return 0;
reg = EDP_PSR_STATUS;
mask = EDP_PSR_STATUS_STATE_MASK;
}
/* /*
* Max time for PSR to idle = Inverse of the refresh rate + * Max time for PSR to idle = Inverse of the refresh rate +
...@@ -801,7 +796,8 @@ int intel_psr_wait_for_idle(const struct intel_crtc_state *new_crtc_state, ...@@ -801,7 +796,8 @@ int intel_psr_wait_for_idle(const struct intel_crtc_state *new_crtc_state,
* handshake. 50 msec is defesive enough to cover everything. * handshake. 50 msec is defesive enough to cover everything.
*/ */
return __intel_wait_for_register(dev_priv, reg, mask, return __intel_wait_for_register(dev_priv, EDP_PSR_STATUS,
EDP_PSR_STATUS_STATE_MASK,
EDP_PSR_STATUS_STATE_IDLE, 2, 50, EDP_PSR_STATUS_STATE_IDLE, 2, 50,
out_value); out_value);
} }
......
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