mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-30 19:13:03 -04:00
drm/i915: move some display runtime suspend operations earlier
In preparation for abstracting display runtime suspend/resume calls, relocate opregion adapter notification and hotplug poll enable slightly earlier. Even though this is intended to be a non-functional change, do it as a separate step to pinpoint any issues here. Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patch.msgid.link/00d016457a78589b97972203a52a390f5f1a3541.1782913901.git.jani.nikula@intel.com Signed-off-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
@@ -1518,11 +1518,39 @@ static int i915_pm_runtime_suspend(struct device *kdev)
|
||||
|
||||
intel_display_power_runtime_suspend(display);
|
||||
|
||||
/*
|
||||
* FIXME: We really should find a document that references the arguments
|
||||
* used below!
|
||||
*/
|
||||
if (IS_BROADWELL(dev_priv)) {
|
||||
/*
|
||||
* On Broadwell, if we use PCI_D1 the PCH DDI ports will stop
|
||||
* being detected, and the call we do at i915_pm_runtime_resume()
|
||||
* won't be able to restore them. Since PCI_D3hot matches the
|
||||
* actual specification and appears to be working, use it.
|
||||
*/
|
||||
intel_opregion_notify_adapter(display, PCI_D3hot);
|
||||
} else {
|
||||
/*
|
||||
* current versions of firmware which depend on this opregion
|
||||
* notification have repurposed the D1 definition to mean
|
||||
* "runtime suspended" vs. what you would normally expect (D3)
|
||||
* to distinguish it from notifications that might be sent via
|
||||
* the suspend path.
|
||||
*/
|
||||
intel_opregion_notify_adapter(display, PCI_D1);
|
||||
}
|
||||
|
||||
if (!IS_VALLEYVIEW(dev_priv) && !IS_CHERRYVIEW(dev_priv))
|
||||
intel_hpd_poll_enable(display);
|
||||
|
||||
ret = vlv_suspend_complete(dev_priv);
|
||||
if (ret) {
|
||||
drm_err(&dev_priv->drm,
|
||||
"Runtime suspend failed, disabling it (%d)\n", ret);
|
||||
|
||||
intel_opregion_notify_adapter(display, PCI_D0);
|
||||
|
||||
intel_display_power_runtime_resume(display);
|
||||
|
||||
for_each_gt(gt, dev_priv, i)
|
||||
@@ -1554,34 +1582,8 @@ static int i915_pm_runtime_suspend(struct device *kdev)
|
||||
if (root_pdev)
|
||||
pci_d3cold_disable(root_pdev);
|
||||
|
||||
/*
|
||||
* FIXME: We really should find a document that references the arguments
|
||||
* used below!
|
||||
*/
|
||||
if (IS_BROADWELL(dev_priv)) {
|
||||
/*
|
||||
* On Broadwell, if we use PCI_D1 the PCH DDI ports will stop
|
||||
* being detected, and the call we do at i915_pm_runtime_resume()
|
||||
* won't be able to restore them. Since PCI_D3hot matches the
|
||||
* actual specification and appears to be working, use it.
|
||||
*/
|
||||
intel_opregion_notify_adapter(display, PCI_D3hot);
|
||||
} else {
|
||||
/*
|
||||
* current versions of firmware which depend on this opregion
|
||||
* notification have repurposed the D1 definition to mean
|
||||
* "runtime suspended" vs. what you would normally expect (D3)
|
||||
* to distinguish it from notifications that might be sent via
|
||||
* the suspend path.
|
||||
*/
|
||||
intel_opregion_notify_adapter(display, PCI_D1);
|
||||
}
|
||||
|
||||
assert_forcewakes_inactive(&dev_priv->uncore);
|
||||
|
||||
if (!IS_VALLEYVIEW(dev_priv) && !IS_CHERRYVIEW(dev_priv))
|
||||
intel_hpd_poll_enable(display);
|
||||
|
||||
drm_dbg(&dev_priv->drm, "Device suspended\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user