[PATCH 17/21] gt.awake

Chris Wilson chris at chris-wilson.co.uk
Fri Dec 1 13:06:41 UTC 2017


---
 drivers/gpu/drm/i915/i915_gem.c         | 8 ++++----
 drivers/gpu/drm/i915/i915_gem_request.c | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 333e20cb8c47..2d92e217a520 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3408,15 +3408,15 @@ i915_gem_idle_work_handler(struct work_struct *work)
 	 */
 	synchronize_irq(dev_priv->drm.irq);
 
+	GEM_BUG_ON(!dev_priv->gt.awake);
+	dev_priv->gt.awake = false;
+	rearm_hangcheck = false;
+
 	intel_engines_park(dev_priv);
 	i915_gem_timelines_park(dev_priv);
 
 	i915_pmu_gt_parked(dev_priv);
 
-	GEM_BUG_ON(!dev_priv->gt.awake);
-	dev_priv->gt.awake = false;
-	rearm_hangcheck = false;
-
 	if (INTEL_GEN(dev_priv) >= 6)
 		gen6_rps_idle(dev_priv);
 	intel_runtime_pm_put(dev_priv);
diff --git a/drivers/gpu/drm/i915/i915_gem_request.c b/drivers/gpu/drm/i915/i915_gem_request.c
index ebf4a9107ccf..58be2a28dc60 100644
--- a/drivers/gpu/drm/i915/i915_gem_request.c
+++ b/drivers/gpu/drm/i915/i915_gem_request.c
@@ -253,7 +253,6 @@ static void mark_busy(struct drm_i915_private *i915)
 	GEM_BUG_ON(!i915->gt.active_requests);
 
 	intel_runtime_pm_get_noresume(i915);
-	i915->gt.awake = true;
 
 	i915_update_gfx_val(i915);
 	if (INTEL_GEN(i915) >= 6)
@@ -262,6 +261,7 @@ static void mark_busy(struct drm_i915_private *i915)
 
 	intel_engines_unpark(i915);
 
+	i915->gt.awake = true;
 	queue_delayed_work(i915->wq,
 			   &i915->gt.retire_work,
 			   round_jiffies_up_relative(HZ));
-- 
2.15.1



More information about the Intel-gfx-trybot mailing list