[PATCH 2/2] core
Chris Wilson
chris at chris-wilson.co.uk
Fri Aug 10 01:05:34 UTC 2018
---
drivers/gpu/drm/i915/intel_runtime_pm.c | 15 ++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_runtime_pm.c b/drivers/gpu/drm/i915/intel_runtime_pm.c
index b78c3b48aa62..85d9c2dc96c1 100644
--- a/drivers/gpu/drm/i915/intel_runtime_pm.c
+++ b/drivers/gpu/drm/i915/intel_runtime_pm.c
@@ -3793,17 +3793,6 @@ void intel_power_domains_init_hw(struct drm_i915_private *dev_priv, bool resume)
*/
void intel_power_domains_fini_hw(struct drm_i915_private *dev_priv)
{
- /*
- * The i915.ko module is still not prepared to be loaded when
- * the power well is not enabled, so just enable it in case
- * we're going to unload/reload.
- * The following also reacquires the RPM reference the core passed
- * to the driver during loading, which is dropped in
- * intel_runtime_pm_enable(). We have to hand back the control of the
- * device to the core with this reference held.
- */
- intel_display_set_init_power(dev_priv, true);
-
/* Remove the refcount we took to keep power well support disabled. */
if (!i915_modparams.disable_power_well)
intel_display_power_put(dev_priv, POWER_DOMAIN_INIT);
@@ -4079,4 +4068,8 @@ void intel_runtime_pm_disable(struct drm_i915_private *dev_priv)
*/
if (!HAS_RUNTIME_PM(dev_priv))
pm_runtime_put(kdev);
+
+ /* Return with the core's original wakeref back in place. */
+ WARN(pm_runtime_get_sync(kdev) < 0,
+ "pm_runtime_get_sync() failed\n");
}
--
2.18.0
More information about the Intel-gfx-trybot
mailing list