drm/i915: Drop redundant checks to update PSR state

All of this checks are redudant and can be removed as the if bellow
already takes care when there is no changes in the state.
Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: default avatarDhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190308000050.6226-7-jose.souza@intel.com
parent 618cf883
......@@ -880,15 +880,11 @@ void intel_psr_update(struct intel_dp *intel_dp,
if (enable == psr->enabled && psr2_enable == psr->psr2_enabled)
goto unlock;
if (psr->enabled) {
if (!enable || psr2_enable != psr->psr2_enabled)
intel_psr_disable_locked(intel_dp);
}
if (psr->enabled)
intel_psr_disable_locked(intel_dp);
if (enable) {
if (!psr->enabled || psr2_enable != psr->psr2_enabled)
intel_psr_enable_locked(dev_priv, crtc_state);
}
if (enable)
intel_psr_enable_locked(dev_priv, crtc_state);
unlock:
mutex_unlock(&dev_priv->psr.lock);
......
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