[PATCH] drm/i915/execlists: Skip preemption-timeout for lite restores

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If we are planning to perform a lite-restore, we want to replace the
running context with itself. We can therefore exempt this from the
preemption timeout.

Doing so does however increase the risk of a higher priority client
arriving later finding itself unable to proceed because of an unchecked
earlier failed preemption.

Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
---
 drivers/gpu/drm/i915/gt/intel_lrc.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
index 9a0d0282f3ca..eb83c87c8b4e 100644
--- a/drivers/gpu/drm/i915/gt/intel_lrc.c
+++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
@@ -1737,6 +1737,11 @@ static unsigned long active_preempt_timeout(struct intel_engine_cs *engine)
 	if (!rq)
 		return 0;
 
+	/* Don't enforce a lite-restore, the client is already running */
+	GEM_BUG_ON(!engine->execlists.pending[0]);
+	if (rq->context == engine->execlists.pending[0]->context)
+		return 0;
+
 	/* Force a fast reset for terminated contexts (ignoring sysfs!) */
 	if (unlikely(intel_context_is_banned(rq->context)))
 		return 1;
-- 
2.25.0

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



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux