[PATCH 3/3] hmmm3

Chris Wilson chris at chris-wilson.co.uk
Sat Nov 23 22:20:10 UTC 2019


---
 drivers/gpu/drm/i915/gt/intel_engine_pm.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_engine_pm.c b/drivers/gpu/drm/i915/gt/intel_engine_pm.c
index 0e1ad4a4bd97..5b696ef6e6bd 100644
--- a/drivers/gpu/drm/i915/gt/intel_engine_pm.c
+++ b/drivers/gpu/drm/i915/gt/intel_engine_pm.c
@@ -94,7 +94,7 @@ __queue_and_release_pm(struct i915_request *rq,
 	spin_lock(&timelines->lock);
 
 	/* Let intel_gt_retire_requests() retire us (acquired under lock) */
-	if (!atomic_fetch_inc(&tl->active_count))
+	if (!atomic_read(&tl->active_count))
 		list_add_tail(&tl->link, &timelines->active_list);
 
 	/* Hand the request over to HW and so engine_retire() */
@@ -102,6 +102,7 @@ __queue_and_release_pm(struct i915_request *rq,
 
 	/* Let new submissions commence (and maybe retire this timeline) */
 	__intel_wakeref_defer_park(&engine->wakeref);
+	atomic_inc(&tl->active_count);
 
 	spin_unlock(&timelines->lock);
 }
-- 
2.24.0



More information about the Intel-gfx-trybot mailing list