drm/i915/execlists: Move the GEM_BUG_ON context matches CSB later
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 21 Feb 2018 15:23:01 +0000 (15:23 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 22 Feb 2018 09:08:39 +0000 (09:08 +0000)
Print out the current request/context before doing the GEM_BUG_ON, so
that we can inspect the values in the ftrace.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180221152301.9178-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/intel_lrc.c

index 34fa8778b1f4b84ce601f4f11d8006f5465f5db7..964885b5d7cb009c60e4c31e255554e58a6813af 100644 (file)
@@ -863,14 +863,15 @@ static void execlists_submission_tasklet(unsigned long data)
                        GEM_BUG_ON(!execlists_is_active(execlists,
                                                        EXECLISTS_ACTIVE_USER));
 
-                       /* Check the context/desc id for this event matches */
-                       GEM_DEBUG_BUG_ON(buf[2 * head + 1] != port->context_id);
-
                        rq = port_unpack(port, &count);
                        GEM_TRACE("%s out[0]: ctx=%d.%d, seqno=%x\n",
                                  engine->name,
                                  port->context_id, count,
                                  rq ? rq->global_seqno : 0);
+
+                       /* Check the context/desc id for this event matches */
+                       GEM_DEBUG_BUG_ON(buf[2 * head + 1] != port->context_id);
+
                        GEM_BUG_ON(count == 0);
                        if (--count == 0) {
                                GEM_BUG_ON(status & GEN8_CTX_STATUS_PREEMPTED);