Commit 98fa2aec authored by Dhinakaran Pandiyan's avatar Dhinakaran Pandiyan Committed by Dhinakaran Pandiyan

drm/i915/psr: Fix warning in intel_psr_activate()

commit 5422b37c ("drm/i915/psr: Kill delays when activating psr
back.") removed the call to cancel a scheduled psr_work from
psr_disable() and instead added an early return in the work function. But,
if the scheduled work item is executed after psr_enable(), we end up
printing warnings as PSR is already enabled and active. So, put the
cancel_work call back in psr_disable().

Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: José Roberto de Souza <jose.souza@intel.com>
Fixes: 5422b37c ("drm/i915/psr: Kill delays when activating psr back.")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106948Signed-off-by: default avatarDhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: default avatarDhinakaran Pandiyan <dhinakaran.pandiyan@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180618220207.2778-1-dhinakaran.pandiyan@intel.com
parent f648661b
...@@ -754,6 +754,7 @@ void intel_psr_disable(struct intel_dp *intel_dp, ...@@ -754,6 +754,7 @@ void intel_psr_disable(struct intel_dp *intel_dp,
dev_priv->psr.enabled = NULL; dev_priv->psr.enabled = NULL;
mutex_unlock(&dev_priv->psr.lock); mutex_unlock(&dev_priv->psr.lock);
cancel_work_sync(&dev_priv->psr.work);
} }
static bool psr_wait_for_idle(struct drm_i915_private *dev_priv) static bool psr_wait_for_idle(struct drm_i915_private *dev_priv)
......
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