[Intel-gfx] [RFC 18/39] drm/i915: Added scheduler interrupt handler hook

John.C.Harrison at Intel.com John.C.Harrison at Intel.com
Fri Jul 17 07:33:27 PDT 2015


From: John Harrison <John.C.Harrison at Intel.com>

The scheduler needs to be informed of each batch buffer completion. This is done
via the user interrupt mechanism. The epilogue of each batch buffer submission
updates a sequence number value (seqno) and triggers a user interrupt.

This change hooks the scheduler in to the processing of that interrupt via the
notify_ring() function. The scheduler also has clean up code that needs to be
done outside of the interrupt context, thus notify_ring() now also pokes the
scheduler's work queue.

Change-Id: I4724b3ad7782453a244f84744d54bf14f5b65a38
For: VIZ-1587
Signed-off-by: John Harrison <John.C.Harrison at Intel.com>
---
 drivers/gpu/drm/i915/i915_irq.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index f67d09b..40a2eff 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -36,6 +36,7 @@
 #include "i915_drv.h"
 #include "i915_trace.h"
 #include "intel_drv.h"
+#include "i915_scheduler.h"
 
 /**
  * DOC: interrupt handling
@@ -851,6 +852,8 @@ static void notify_ring(struct intel_engine_cs *ring)
 	if (!intel_ring_initialized(ring))
 		return;
 
+	i915_scheduler_handle_irq(ring);
+
 	i915_gem_request_notify(ring);
 
 	wake_up_all(&ring->irq_queue);
-- 
1.9.1



More information about the Intel-gfx mailing list