Skip to content

Commit 3a06872

Browse files
committed
drm/i915: Show ring->start for the ELSP context/request queue
Since the advent of execlists, the HW no longer executes from a single statically assigned ring, but instead switches to a different ring for each context (logical ringbuffer contexts as it is called). So a good way to tally the executing context against what we have queued is by comparing the RING_START register against our requests. Make it so. 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/20180502104150.29874-1-chris@chris-wilson.co.uk
1 parent 77cbe92 commit 3a06872

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

drivers/gpu/drm/i915/i915_gpu_error.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -410,11 +410,11 @@ static void error_print_request(struct drm_i915_error_state_buf *m,
410410
if (!erq->seqno)
411411
return;
412412

413-
err_printf(m, "%s pid %d, ban score %d, seqno %8x:%08x, prio %d, emitted %dms, head %08x, tail %08x\n",
413+
err_printf(m, "%s pid %d, ban score %d, seqno %8x:%08x, prio %d, emitted %dms, start %08x, head %08x, tail %08x\n",
414414
prefix, erq->pid, erq->ban_score,
415415
erq->context, erq->seqno, erq->sched_attr.priority,
416416
jiffies_to_msecs(erq->jiffies - epoch),
417-
erq->head, erq->tail);
417+
erq->start, erq->head, erq->tail);
418418
}
419419

420420
static void error_print_context(struct drm_i915_error_state_buf *m,
@@ -1292,6 +1292,7 @@ static void record_request(struct i915_request *request,
12921292
erq->ban_score = atomic_read(&request->ctx->ban_score);
12931293
erq->seqno = request->global_seqno;
12941294
erq->jiffies = request->emitted_jiffies;
1295+
erq->start = i915_ggtt_offset(request->ring->vma);
12951296
erq->head = request->head;
12961297
erq->tail = request->tail;
12971298

drivers/gpu/drm/i915/i915_gpu_error.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ struct i915_gpu_state {
152152
u32 context;
153153
int ban_score;
154154
u32 seqno;
155+
u32 start;
155156
u32 head;
156157
u32 tail;
157158
struct i915_sched_attr sched_attr;

drivers/gpu/drm/i915/intel_engine_cs.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1278,8 +1278,9 @@ static void intel_engine_print_registers(const struct intel_engine_cs *engine,
12781278
char hdr[80];
12791279

12801280
snprintf(hdr, sizeof(hdr),
1281-
"\t\tELSP[%d] count=%d, rq: ",
1282-
idx, count);
1281+
"\t\tELSP[%d] count=%d, ring->start=%08x, rq: ",
1282+
idx, count,
1283+
i915_ggtt_offset(rq->ring->vma));
12831284
print_request(m, rq, hdr);
12841285
} else {
12851286
drm_printf(m, "\t\tELSP[%d] idle\n", idx);

0 commit comments

Comments
 (0)