All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/gt: Cleanup heartbeat systole first
@ 2019-11-06 22:34 ` Chris Wilson
  0 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2019-11-06 22:34 UTC (permalink / raw)
  To: intel-gfx

Before we grab the engine wakeref, tidy up the previous heartbeat
request. If we then abort because the engine powerwell is off, we ensure
the request is freed as we know we will not have freed it when
cancelling the work (as the work is running!).

Fixes: 841e86728615 ("drm/i915/gt: Only drop heartbeat.systole if the sole owner")
References: 058179e72e09 ("drm/i915/gt: Replace hangcheck by heartbeats")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
---
 drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c b/drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c
index 06aa14c7aa8c..c91fd4e4af29 100644
--- a/drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c
+++ b/drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c
@@ -63,15 +63,15 @@ static void heartbeat(struct work_struct *wrk)
 	struct intel_context *ce = engine->kernel_context;
 	struct i915_request *rq;
 
-	if (!intel_engine_pm_get_if_awake(engine))
-		return;
-
 	rq = engine->heartbeat.systole;
 	if (rq && i915_request_completed(rq)) {
 		i915_request_put(rq);
 		engine->heartbeat.systole = NULL;
 	}
 
+	if (!intel_engine_pm_get_if_awake(engine))
+		return;
+
 	if (intel_gt_is_wedged(engine->gt))
 		goto out;
 
-- 
2.24.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-11-08  5:31 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-06 22:34 [PATCH] drm/i915/gt: Cleanup heartbeat systole first Chris Wilson
2019-11-06 22:34 ` [Intel-gfx] " Chris Wilson
2019-11-07  1:17 ` ✗ Fi.CI.CHECKPATCH: warning for " Patchwork
2019-11-07  1:17   ` [Intel-gfx] " Patchwork
2019-11-07  1:38 ` ✓ Fi.CI.BAT: success " Patchwork
2019-11-07  1:38   ` [Intel-gfx] " Patchwork
2019-11-07  7:45 ` [PATCH] " Mika Kuoppala
2019-11-07  7:45   ` [Intel-gfx] " Mika Kuoppala
2019-11-08  5:31 ` ✓ Fi.CI.IGT: success for " Patchwork
2019-11-08  5:31   ` [Intel-gfx] " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.