Commit 908764f6 authored by Imre Deak's avatar Imre Deak

drm/i915/lspcon: Enable AUX interrupts for resume time initialization

For LSPCON initialization during system resume we need AUX
functionality, but we call the corresponding encoder reset hook with all
interrupts disabled. Without interrupts we'll do a poll-wait for AUX
transfer completions, which adds a significant delay if the transfers
timeout/need to be retried for some reason.

Fix this by enabling interrupts before calling the reset hooks. Note
that while this will enable AUX interrupts it will keep HPD interrupts
disabled, in a similar way to the init time output setup code.

This issue existed since LSPCON support was added.

v2:
- Rebased on drm-tip.

Cc: Shashank Sharma <shashank.sharma@intel.com>
Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Tested-by: default avatarDavid Weinehall <david.weinehall@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1480448429-27739-1-git-send-email-imre.deak@intel.com
parent 3e4274f8
...@@ -1575,18 +1575,21 @@ static int i915_drm_resume(struct drm_device *dev) ...@@ -1575,18 +1575,21 @@ static int i915_drm_resume(struct drm_device *dev)
intel_opregion_setup(dev_priv); intel_opregion_setup(dev_priv);
intel_init_pch_refclk(dev_priv); intel_init_pch_refclk(dev_priv);
drm_mode_config_reset(dev);
/* /*
* Interrupts have to be enabled before any batches are run. If not the * Interrupts have to be enabled before any batches are run. If not the
* GPU will hang. i915_gem_init_hw() will initiate batches to * GPU will hang. i915_gem_init_hw() will initiate batches to
* update/restore the context. * update/restore the context.
* *
* drm_mode_config_reset() needs AUX interrupts.
*
* Modeset enabling in intel_modeset_init_hw() also needs working * Modeset enabling in intel_modeset_init_hw() also needs working
* interrupts. * interrupts.
*/ */
intel_runtime_pm_enable_interrupts(dev_priv); intel_runtime_pm_enable_interrupts(dev_priv);
drm_mode_config_reset(dev);
mutex_lock(&dev->struct_mutex); mutex_lock(&dev->struct_mutex);
if (i915_gem_init_hw(dev)) { if (i915_gem_init_hw(dev)) {
DRM_ERROR("failed to re-initialize GPU, declaring wedged!\n"); DRM_ERROR("failed to re-initialize GPU, declaring wedged!\n");
......
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