* [Intel-gfx] [CI 1/6] drm/i915/gt: Include semaphore status in print_request()
@ 2020-11-19 16:56 Chris Wilson
2020-11-19 16:56 ` [Intel-gfx] [CI 2/6] drm/i915: Lift i915_request_show() Chris Wilson
` (6 more replies)
0 siblings, 7 replies; 10+ messages in thread
From: Chris Wilson @ 2020-11-19 16:56 UTC (permalink / raw)
To: intel-gfx
When pretty-printing the requests for debug, also show the status of any
semaphore waits as part of its runnable status.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
---
drivers/gpu/drm/i915/gt/intel_engine_cs.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
index 0b31670343f5..1ed84ee8ce41 100644
--- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
@@ -1321,6 +1321,7 @@ static void print_request(struct drm_printer *m,
rq->fence.context, rq->fence.seqno,
i915_request_completed(rq) ? "!" :
i915_request_started(rq) ? "*" :
+ !i915_sw_fence_signaled(&rq->semaphore) ? "&" :
"",
test_bit(DMA_FENCE_FLAG_SIGNALED_BIT,
&rq->fence.flags) ? "+" :
--
2.20.1
_______________________________________________
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
* [Intel-gfx] [CI 2/6] drm/i915: Lift i915_request_show()
2020-11-19 16:56 [Intel-gfx] [CI 1/6] drm/i915/gt: Include semaphore status in print_request() Chris Wilson
@ 2020-11-19 16:56 ` Chris Wilson
2020-11-19 16:56 ` [Intel-gfx] [CI 3/6] drm/i915/gt: Update request status flags for debug pretty-printer Chris Wilson
` (5 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2020-11-19 16:56 UTC (permalink / raw)
To: intel-gfx
Extract i915_request_show for reuse in other request chain pretty
printers.
For a bonus point, quietly change the seqno format from %llx to %lld to
match everywhere else.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
drivers/gpu/drm/i915/gt/intel_engine_cs.c | 47 ++---------------------
drivers/gpu/drm/i915/gt/intel_lrc.c | 2 +-
drivers/gpu/drm/i915/gt/intel_lrc.h | 2 +-
drivers/gpu/drm/i915/i915_request.c | 39 +++++++++++++++++++
drivers/gpu/drm/i915/i915_request.h | 5 +++
5 files changed, 50 insertions(+), 45 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
index 1ed84ee8ce41..c3bb2e9546e6 100644
--- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
@@ -1294,45 +1294,6 @@ bool intel_engine_can_store_dword(struct intel_engine_cs *engine)
}
}
-static int print_sched_attr(const struct i915_sched_attr *attr,
- char *buf, int x, int len)
-{
- if (attr->priority == I915_PRIORITY_INVALID)
- return x;
-
- x += snprintf(buf + x, len - x,
- " prio=%d", attr->priority);
-
- return x;
-}
-
-static void print_request(struct drm_printer *m,
- struct i915_request *rq,
- const char *prefix)
-{
- const char *name = rq->fence.ops->get_timeline_name(&rq->fence);
- char buf[80] = "";
- int x = 0;
-
- x = print_sched_attr(&rq->sched.attr, buf, x, sizeof(buf));
-
- drm_printf(m, "%s %llx:%llx%s%s %s @ %dms: %s\n",
- prefix,
- rq->fence.context, rq->fence.seqno,
- i915_request_completed(rq) ? "!" :
- i915_request_started(rq) ? "*" :
- !i915_sw_fence_signaled(&rq->semaphore) ? "&" :
- "",
- test_bit(DMA_FENCE_FLAG_SIGNALED_BIT,
- &rq->fence.flags) ? "+" :
- test_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT,
- &rq->fence.flags) ? "-" :
- "",
- buf,
- jiffies_to_msecs(jiffies - rq->emitted_jiffies),
- name);
-}
-
static struct intel_timeline *get_timeline(struct i915_request *rq)
{
struct intel_timeline *tl;
@@ -1530,7 +1491,7 @@ static void intel_engine_print_registers(struct intel_engine_cs *engine,
intel_context_is_banned(rq->context) ? "*" : "");
len += print_ring(hdr + len, sizeof(hdr) - len, rq);
scnprintf(hdr + len, sizeof(hdr) - len, "rq: ");
- print_request(m, rq, hdr);
+ i915_request_show(m, rq, hdr);
}
for (port = execlists->pending; (rq = *port); port++) {
char hdr[160];
@@ -1544,7 +1505,7 @@ static void intel_engine_print_registers(struct intel_engine_cs *engine,
intel_context_is_banned(rq->context) ? "*" : "");
len += print_ring(hdr + len, sizeof(hdr) - len, rq);
scnprintf(hdr + len, sizeof(hdr) - len, "rq: ");
- print_request(m, rq, hdr);
+ i915_request_show(m, rq, hdr);
}
rcu_read_unlock();
execlists_active_unlock_bh(execlists);
@@ -1688,7 +1649,7 @@ void intel_engine_dump(struct intel_engine_cs *engine,
if (rq) {
struct intel_timeline *tl = get_timeline(rq);
- print_request(m, rq, "\t\tactive ");
+ i915_request_show(m, rq, "\t\tactive ");
drm_printf(m, "\t\tring->start: 0x%08x\n",
i915_ggtt_offset(rq->ring->vma));
@@ -1726,7 +1687,7 @@ void intel_engine_dump(struct intel_engine_cs *engine,
drm_printf(m, "\tDevice is asleep; skipping register dump\n");
}
- intel_execlists_show_requests(engine, m, print_request, 8);
+ intel_execlists_show_requests(engine, m, i915_request_show, 8);
drm_printf(m, "HWSP:\n");
hexdump(m, engine->status_page.addr, PAGE_SIZE);
diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
index f7eca93f04bc..b6ab1161942a 100644
--- a/drivers/gpu/drm/i915/gt/intel_lrc.c
+++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
@@ -5981,7 +5981,7 @@ int intel_virtual_engine_attach_bond(struct intel_engine_cs *engine,
void intel_execlists_show_requests(struct intel_engine_cs *engine,
struct drm_printer *m,
void (*show_request)(struct drm_printer *m,
- struct i915_request *rq,
+ const struct i915_request *rq,
const char *prefix),
unsigned int max)
{
diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.h b/drivers/gpu/drm/i915/gt/intel_lrc.h
index c2d287f25497..32e6e204f544 100644
--- a/drivers/gpu/drm/i915/gt/intel_lrc.h
+++ b/drivers/gpu/drm/i915/gt/intel_lrc.h
@@ -106,7 +106,7 @@ void intel_lr_context_reset(struct intel_engine_cs *engine,
void intel_execlists_show_requests(struct intel_engine_cs *engine,
struct drm_printer *m,
void (*show_request)(struct drm_printer *m,
- struct i915_request *rq,
+ const struct i915_request *rq,
const char *prefix),
unsigned int max);
diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c
index 0e813819b041..673991718ae6 100644
--- a/drivers/gpu/drm/i915/i915_request.c
+++ b/drivers/gpu/drm/i915/i915_request.c
@@ -1855,6 +1855,45 @@ long i915_request_wait(struct i915_request *rq,
return timeout;
}
+static int print_sched_attr(const struct i915_sched_attr *attr,
+ char *buf, int x, int len)
+{
+ if (attr->priority == I915_PRIORITY_INVALID)
+ return x;
+
+ x += snprintf(buf + x, len - x,
+ " prio=%d", attr->priority);
+
+ return x;
+}
+
+void i915_request_show(struct drm_printer *m,
+ const struct i915_request *rq,
+ const char *prefix)
+{
+ const char *name = rq->fence.ops->get_timeline_name((struct dma_fence *)&rq->fence);
+ char buf[80] = "";
+ int x = 0;
+
+ x = print_sched_attr(&rq->sched.attr, buf, x, sizeof(buf));
+
+ drm_printf(m, "%s %llx:%lld%s%s %s @ %dms: %s\n",
+ prefix,
+ rq->fence.context, rq->fence.seqno,
+ i915_request_completed(rq) ? "!" :
+ i915_request_started(rq) ? "*" :
+ !i915_sw_fence_signaled(&rq->semaphore) ? "&" :
+ "",
+ test_bit(DMA_FENCE_FLAG_SIGNALED_BIT,
+ &rq->fence.flags) ? "+" :
+ test_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT,
+ &rq->fence.flags) ? "-" :
+ "",
+ buf,
+ jiffies_to_msecs(jiffies - rq->emitted_jiffies),
+ name);
+}
+
#if IS_ENABLED(CONFIG_DRM_I915_SELFTEST)
#include "selftests/mock_request.c"
#include "selftests/i915_request.c"
diff --git a/drivers/gpu/drm/i915/i915_request.h b/drivers/gpu/drm/i915/i915_request.h
index 16b721080195..09609071b725 100644
--- a/drivers/gpu/drm/i915/i915_request.h
+++ b/drivers/gpu/drm/i915/i915_request.h
@@ -43,6 +43,7 @@
struct drm_file;
struct drm_i915_gem_object;
+struct drm_printer;
struct i915_request;
struct i915_capture_list {
@@ -369,6 +370,10 @@ long i915_request_wait(struct i915_request *rq,
#define I915_WAIT_PRIORITY BIT(1) /* small priority bump for the request */
#define I915_WAIT_ALL BIT(2) /* used by i915_gem_object_wait() */
+void i915_request_show(struct drm_printer *m,
+ const struct i915_request *rq,
+ const char *prefix);
+
static inline bool i915_request_signaled(const struct i915_request *rq)
{
/* The request may live longer than its HWSP, so check flags first! */
--
2.20.1
_______________________________________________
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
* [Intel-gfx] [CI 3/6] drm/i915/gt: Update request status flags for debug pretty-printer
2020-11-19 16:56 [Intel-gfx] [CI 1/6] drm/i915/gt: Include semaphore status in print_request() Chris Wilson
2020-11-19 16:56 ` [Intel-gfx] [CI 2/6] drm/i915: Lift i915_request_show() Chris Wilson
@ 2020-11-19 16:56 ` Chris Wilson
2020-11-19 16:56 ` [Intel-gfx] [CI 4/6] drm/i915/gt: Show all active timelines for debugging Chris Wilson
` (4 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2020-11-19 16:56 UTC (permalink / raw)
To: intel-gfx
We plan to expand upon the number of available statuses for when we
pretty-print the requests along the timelines, and so need a new set of
flags. We have settled upon:
Unready [U]
- initial status after being submitted, the request is not
ready for execution as it is waiting for external fences
Ready [R]
- all fences the request was waiting on have been signaled,
and the request is now ready for execution and will be
in a backend queue
- a ready request may still need to wait on semaphores
[internal fences]
Ready/virtual [V]
- same as ready, but queued over multiple backends
Executing [E]
- the request has been transferred from the backend queue and
submitted for execution on HW
- a completed request may still be regarded as executing, its
status may not be updated until it is retired and removed
from the lists
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
drivers/gpu/drm/i915/gt/intel_engine_cs.c | 6 +-
drivers/gpu/drm/i915/gt/intel_lrc.c | 15 ++--
drivers/gpu/drm/i915/gt/intel_lrc.h | 3 +-
drivers/gpu/drm/i915/i915_request.c | 85 +++++++++++++++++++----
drivers/gpu/drm/i915/i915_request.h | 3 +-
5 files changed, 88 insertions(+), 24 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
index c3bb2e9546e6..d4e988b2816a 100644
--- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
@@ -1491,7 +1491,7 @@ static void intel_engine_print_registers(struct intel_engine_cs *engine,
intel_context_is_banned(rq->context) ? "*" : "");
len += print_ring(hdr + len, sizeof(hdr) - len, rq);
scnprintf(hdr + len, sizeof(hdr) - len, "rq: ");
- i915_request_show(m, rq, hdr);
+ i915_request_show(m, rq, hdr, 0);
}
for (port = execlists->pending; (rq = *port); port++) {
char hdr[160];
@@ -1505,7 +1505,7 @@ static void intel_engine_print_registers(struct intel_engine_cs *engine,
intel_context_is_banned(rq->context) ? "*" : "");
len += print_ring(hdr + len, sizeof(hdr) - len, rq);
scnprintf(hdr + len, sizeof(hdr) - len, "rq: ");
- i915_request_show(m, rq, hdr);
+ i915_request_show(m, rq, hdr, 0);
}
rcu_read_unlock();
execlists_active_unlock_bh(execlists);
@@ -1649,7 +1649,7 @@ void intel_engine_dump(struct intel_engine_cs *engine,
if (rq) {
struct intel_timeline *tl = get_timeline(rq);
- i915_request_show(m, rq, "\t\tactive ");
+ i915_request_show(m, rq, "\t\tactive ", 0);
drm_printf(m, "\t\tring->start: 0x%08x\n",
i915_ggtt_offset(rq->ring->vma));
diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
index b6ab1161942a..5257f3c71366 100644
--- a/drivers/gpu/drm/i915/gt/intel_lrc.c
+++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
@@ -5982,7 +5982,8 @@ void intel_execlists_show_requests(struct intel_engine_cs *engine,
struct drm_printer *m,
void (*show_request)(struct drm_printer *m,
const struct i915_request *rq,
- const char *prefix),
+ const char *prefix,
+ int indent),
unsigned int max)
{
const struct intel_engine_execlists *execlists = &engine->execlists;
@@ -5997,7 +5998,7 @@ void intel_execlists_show_requests(struct intel_engine_cs *engine,
count = 0;
list_for_each_entry(rq, &engine->active.requests, sched.link) {
if (count++ < max - 1)
- show_request(m, rq, "\t\tE ");
+ show_request(m, rq, "\t\t", 0);
else
last = rq;
}
@@ -6007,7 +6008,7 @@ void intel_execlists_show_requests(struct intel_engine_cs *engine,
"\t\t...skipping %d executing requests...\n",
count - max);
}
- show_request(m, last, "\t\tE ");
+ show_request(m, last, "\t\t", 0);
}
if (execlists->switch_priority_hint != INT_MIN)
@@ -6025,7 +6026,7 @@ void intel_execlists_show_requests(struct intel_engine_cs *engine,
priolist_for_each_request(rq, p, i) {
if (count++ < max - 1)
- show_request(m, rq, "\t\tQ ");
+ show_request(m, rq, "\t\t", 0);
else
last = rq;
}
@@ -6036,7 +6037,7 @@ void intel_execlists_show_requests(struct intel_engine_cs *engine,
"\t\t...skipping %d queued requests...\n",
count - max);
}
- show_request(m, last, "\t\tQ ");
+ show_request(m, last, "\t\t", 0);
}
last = NULL;
@@ -6048,7 +6049,7 @@ void intel_execlists_show_requests(struct intel_engine_cs *engine,
if (rq) {
if (count++ < max - 1)
- show_request(m, rq, "\t\tV ");
+ show_request(m, rq, "\t\t", 0);
else
last = rq;
}
@@ -6059,7 +6060,7 @@ void intel_execlists_show_requests(struct intel_engine_cs *engine,
"\t\t...skipping %d virtual requests...\n",
count - max);
}
- show_request(m, last, "\t\tV ");
+ show_request(m, last, "\t\t", 0);
}
spin_unlock_irqrestore(&engine->active.lock, flags);
diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.h b/drivers/gpu/drm/i915/gt/intel_lrc.h
index 32e6e204f544..802585a308e9 100644
--- a/drivers/gpu/drm/i915/gt/intel_lrc.h
+++ b/drivers/gpu/drm/i915/gt/intel_lrc.h
@@ -107,7 +107,8 @@ void intel_execlists_show_requests(struct intel_engine_cs *engine,
struct drm_printer *m,
void (*show_request)(struct drm_printer *m,
const struct i915_request *rq,
- const char *prefix),
+ const char *prefix,
+ int indent),
unsigned int max);
struct intel_context *
diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c
index 673991718ae6..24d01e8a9210 100644
--- a/drivers/gpu/drm/i915/i915_request.c
+++ b/drivers/gpu/drm/i915/i915_request.c
@@ -1867,28 +1867,89 @@ static int print_sched_attr(const struct i915_sched_attr *attr,
return x;
}
+static char queue_status(const struct i915_request *rq)
+{
+ if (i915_request_is_active(rq))
+ return 'E';
+
+ if (i915_request_is_ready(rq))
+ return intel_engine_is_virtual(rq->engine) ? 'V' : 'R';
+
+ return 'U';
+}
+
+static const char *run_status(const struct i915_request *rq)
+{
+ if (i915_request_completed(rq))
+ return "!";
+
+ if (i915_request_started(rq))
+ return "*";
+
+ if (!i915_sw_fence_signaled(&rq->semaphore))
+ return "&";
+
+ return "";
+}
+
+static const char *fence_status(const struct i915_request *rq)
+{
+ if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &rq->fence.flags))
+ return "+";
+
+ if (test_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT, &rq->fence.flags))
+ return "-";
+
+ return "";
+}
+
void i915_request_show(struct drm_printer *m,
const struct i915_request *rq,
- const char *prefix)
+ const char *prefix,
+ int indent)
{
const char *name = rq->fence.ops->get_timeline_name((struct dma_fence *)&rq->fence);
char buf[80] = "";
int x = 0;
+ /*
+ * The prefix is used to show the queue status, for which we use
+ * the following flags:
+ *
+ * Unready [U]
+ * - initial status upon being submitted by the user
+ *
+ * - the request is not ready for execution as it is waiting
+ * for external fences
+ *
+ * Ready [R]
+ * - all fences the request was waiting on have been signaled,
+ * and the request is now ready for execution and will be
+ * in a backend queue
+ *
+ * - a ready request may still need to wait on semaphores
+ * [internal fences]
+ *
+ * Ready/virtual [V]
+ * - same as ready, but queued over multiple backends
+ *
+ * Executing [E]
+ * - the request has been transferred from the backend queue and
+ * submitted for execution on HW
+ *
+ * - a completed request may still be regarded as executing, its
+ * status may not be updated until it is retired and removed
+ * from the lists
+ */
+
x = print_sched_attr(&rq->sched.attr, buf, x, sizeof(buf));
- drm_printf(m, "%s %llx:%lld%s%s %s @ %dms: %s\n",
- prefix,
+ drm_printf(m, "%s%.*s%c %llx:%lld%s%s %s @ %dms: %s\n",
+ prefix, indent, " ",
+ queue_status(rq),
rq->fence.context, rq->fence.seqno,
- i915_request_completed(rq) ? "!" :
- i915_request_started(rq) ? "*" :
- !i915_sw_fence_signaled(&rq->semaphore) ? "&" :
- "",
- test_bit(DMA_FENCE_FLAG_SIGNALED_BIT,
- &rq->fence.flags) ? "+" :
- test_bit(DMA_FENCE_FLAG_ENABLE_SIGNAL_BIT,
- &rq->fence.flags) ? "-" :
- "",
+ run_status(rq),
+ fence_status(rq),
buf,
jiffies_to_msecs(jiffies - rq->emitted_jiffies),
name);
diff --git a/drivers/gpu/drm/i915/i915_request.h b/drivers/gpu/drm/i915/i915_request.h
index 09609071b725..8f6173b1c3df 100644
--- a/drivers/gpu/drm/i915/i915_request.h
+++ b/drivers/gpu/drm/i915/i915_request.h
@@ -372,7 +372,8 @@ long i915_request_wait(struct i915_request *rq,
void i915_request_show(struct drm_printer *m,
const struct i915_request *rq,
- const char *prefix);
+ const char *prefix,
+ int indent);
static inline bool i915_request_signaled(const struct i915_request *rq)
{
--
2.20.1
_______________________________________________
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
* [Intel-gfx] [CI 4/6] drm/i915/gt: Show all active timelines for debugging
2020-11-19 16:56 [Intel-gfx] [CI 1/6] drm/i915/gt: Include semaphore status in print_request() Chris Wilson
2020-11-19 16:56 ` [Intel-gfx] [CI 2/6] drm/i915: Lift i915_request_show() Chris Wilson
2020-11-19 16:56 ` [Intel-gfx] [CI 3/6] drm/i915/gt: Update request status flags for debug pretty-printer Chris Wilson
@ 2020-11-19 16:56 ` Chris Wilson
2020-11-19 18:08 ` Tvrtko Ursulin
2020-11-19 16:56 ` [Intel-gfx] [CI 5/6] drm/i915: Lift waiter/signaler iterators Chris Wilson
` (3 subsequent siblings)
6 siblings, 1 reply; 10+ messages in thread
From: Chris Wilson @ 2020-11-19 16:56 UTC (permalink / raw)
To: intel-gfx
Include the active timelines for debugfs/i915_engine_info, so that we
can see which have unready requests inflight which are not shown
otherwise.
Suggested-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewd-by: Chris Wilson <chris@chris-wilson.co.uk>
---
drivers/gpu/drm/i915/gt/intel_timeline.c | 80 ++++++++++++++++++++++++
drivers/gpu/drm/i915/gt/intel_timeline.h | 9 +++
drivers/gpu/drm/i915/i915_debugfs.c | 16 ++---
3 files changed, 98 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/intel_timeline.c b/drivers/gpu/drm/i915/gt/intel_timeline.c
index 7ea94d201fe6..512afacd2bdc 100644
--- a/drivers/gpu/drm/i915/gt/intel_timeline.c
+++ b/drivers/gpu/drm/i915/gt/intel_timeline.c
@@ -617,6 +617,86 @@ void intel_gt_fini_timelines(struct intel_gt *gt)
GEM_BUG_ON(!list_empty(&timelines->hwsp_free_list));
}
+void intel_gt_show_timelines(struct intel_gt *gt,
+ struct drm_printer *m,
+ void (*show_request)(struct drm_printer *m,
+ const struct i915_request *rq,
+ const char *prefix,
+ int indent))
+{
+ struct intel_gt_timelines *timelines = >->timelines;
+ struct intel_timeline *tl, *tn;
+ LIST_HEAD(free);
+
+ spin_lock(&timelines->lock);
+ list_for_each_entry_safe(tl, tn, &timelines->active_list, link) {
+ unsigned long count, ready, inflight;
+ struct i915_request *rq, *rn;
+ struct dma_fence *fence;
+
+ if (!mutex_trylock(&tl->mutex)) {
+ drm_printf(m, "Timeline %llx: busy; skipping\n",
+ tl->fence_context);
+ continue;
+ }
+
+ intel_timeline_get(tl);
+ GEM_BUG_ON(!atomic_read(&tl->active_count));
+ atomic_inc(&tl->active_count); /* pin the list element */
+ spin_unlock(&timelines->lock);
+
+ count = 0;
+ ready = 0;
+ inflight = 0;
+ list_for_each_entry_safe(rq, rn, &tl->requests, link) {
+ if (i915_request_completed(rq))
+ continue;
+
+ count++;
+ if (i915_request_is_ready(rq))
+ ready++;
+ if (i915_request_is_active(rq))
+ inflight++;
+ }
+
+ drm_printf(m, "Timeline %llx: { ", tl->fence_context);
+ drm_printf(m, "count: %lu, ready: %lu, inflight: %lu",
+ count, ready, inflight);
+ drm_printf(m, ", seqno: { current: %d, last: %d }",
+ *tl->hwsp_seqno, tl->seqno);
+ fence = i915_active_fence_get(&tl->last_request);
+ if (fence) {
+ drm_printf(m, ", engine: %s",
+ to_request(fence)->engine->name);
+ dma_fence_put(fence);
+ }
+ drm_printf(m, " }\n");
+
+ if (show_request) {
+ list_for_each_entry_safe(rq, rn, &tl->requests, link)
+ show_request(m, rq, "", 2);
+ }
+
+ mutex_unlock(&tl->mutex);
+ spin_lock(&timelines->lock);
+
+ /* Resume list iteration after reacquiring spinlock */
+ list_safe_reset_next(tl, tn, link);
+ if (atomic_dec_and_test(&tl->active_count))
+ list_del(&tl->link);
+
+ /* Defer the final release to after the spinlock */
+ if (refcount_dec_and_test(&tl->kref.refcount)) {
+ GEM_BUG_ON(atomic_read(&tl->active_count));
+ list_add(&tl->link, &free);
+ }
+ }
+ spin_unlock(&timelines->lock);
+
+ list_for_each_entry_safe(tl, tn, &free, link)
+ __intel_timeline_free(&tl->kref);
+}
+
#if IS_ENABLED(CONFIG_DRM_I915_SELFTEST)
#include "gt/selftests/mock_timeline.c"
#include "gt/selftest_timeline.c"
diff --git a/drivers/gpu/drm/i915/gt/intel_timeline.h b/drivers/gpu/drm/i915/gt/intel_timeline.h
index 9882cd911d8e..634acebd0c4b 100644
--- a/drivers/gpu/drm/i915/gt/intel_timeline.h
+++ b/drivers/gpu/drm/i915/gt/intel_timeline.h
@@ -31,6 +31,8 @@
#include "i915_syncmap.h"
#include "intel_timeline_types.h"
+struct drm_printer;
+
struct intel_timeline *
__intel_timeline_create(struct intel_gt *gt,
struct i915_vma *global_hwsp,
@@ -106,4 +108,11 @@ int intel_timeline_read_hwsp(struct i915_request *from,
void intel_gt_init_timelines(struct intel_gt *gt);
void intel_gt_fini_timelines(struct intel_gt *gt);
+void intel_gt_show_timelines(struct intel_gt *gt,
+ struct drm_printer *m,
+ void (*show_request)(struct drm_printer *m,
+ const struct i915_request *rq,
+ const char *prefix,
+ int indent));
+
#endif
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 77e76b665098..354b95c438d0 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -1306,24 +1306,26 @@ static int i915_runtime_pm_status(struct seq_file *m, void *unused)
static int i915_engine_info(struct seq_file *m, void *unused)
{
- struct drm_i915_private *dev_priv = node_to_i915(m->private);
+ struct drm_i915_private *i915 = node_to_i915(m->private);
struct intel_engine_cs *engine;
intel_wakeref_t wakeref;
struct drm_printer p;
- wakeref = intel_runtime_pm_get(&dev_priv->runtime_pm);
+ wakeref = intel_runtime_pm_get(&i915->runtime_pm);
seq_printf(m, "GT awake? %s [%d]\n",
- yesno(dev_priv->gt.awake),
- atomic_read(&dev_priv->gt.wakeref.count));
+ yesno(i915->gt.awake),
+ atomic_read(&i915->gt.wakeref.count));
seq_printf(m, "CS timestamp frequency: %u Hz\n",
- RUNTIME_INFO(dev_priv)->cs_timestamp_frequency_hz);
+ RUNTIME_INFO(i915)->cs_timestamp_frequency_hz);
p = drm_seq_file_printer(m);
- for_each_uabi_engine(engine, dev_priv)
+ for_each_uabi_engine(engine, i915)
intel_engine_dump(engine, &p, "%s\n", engine->name);
- intel_runtime_pm_put(&dev_priv->runtime_pm, wakeref);
+ intel_gt_show_timelines(&i915->gt, &p, NULL);
+
+ intel_runtime_pm_put(&i915->runtime_pm, wakeref);
return 0;
}
--
2.20.1
_______________________________________________
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
* [Intel-gfx] [CI 5/6] drm/i915: Lift waiter/signaler iterators
2020-11-19 16:56 [Intel-gfx] [CI 1/6] drm/i915/gt: Include semaphore status in print_request() Chris Wilson
` (2 preceding siblings ...)
2020-11-19 16:56 ` [Intel-gfx] [CI 4/6] drm/i915/gt: Show all active timelines for debugging Chris Wilson
@ 2020-11-19 16:56 ` Chris Wilson
2020-11-19 16:56 ` [Intel-gfx] [CI 6/6] drm/i915: Show timeline dependencies for debug Chris Wilson
` (2 subsequent siblings)
6 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2020-11-19 16:56 UTC (permalink / raw)
To: intel-gfx
Lift the list iteration defines for traversing the signaler/waiter lists
into i915_scheduler.h for reuse.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
drivers/gpu/drm/i915/gt/intel_lrc.c | 10 ----------
drivers/gpu/drm/i915/i915_scheduler_types.h | 10 ++++++++++
2 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/i915/gt/intel_lrc.c b/drivers/gpu/drm/i915/gt/intel_lrc.c
index 5257f3c71366..30759e95da0e 100644
--- a/drivers/gpu/drm/i915/gt/intel_lrc.c
+++ b/drivers/gpu/drm/i915/gt/intel_lrc.c
@@ -1836,16 +1836,6 @@ static void virtual_xfer_context(struct virtual_engine *ve,
}
}
-#define for_each_waiter(p__, rq__) \
- list_for_each_entry_lockless(p__, \
- &(rq__)->sched.waiters_list, \
- wait_link)
-
-#define for_each_signaler(p__, rq__) \
- list_for_each_entry_rcu(p__, \
- &(rq__)->sched.signalers_list, \
- signal_link)
-
static void defer_request(struct i915_request *rq, struct list_head * const pl)
{
LIST_HEAD(list);
diff --git a/drivers/gpu/drm/i915/i915_scheduler_types.h b/drivers/gpu/drm/i915/i915_scheduler_types.h
index f72e6c397b08..343ed44d5ed4 100644
--- a/drivers/gpu/drm/i915/i915_scheduler_types.h
+++ b/drivers/gpu/drm/i915/i915_scheduler_types.h
@@ -81,4 +81,14 @@ struct i915_dependency {
#define I915_DEPENDENCY_WEAK BIT(2)
};
+#define for_each_waiter(p__, rq__) \
+ list_for_each_entry_lockless(p__, \
+ &(rq__)->sched.waiters_list, \
+ wait_link)
+
+#define for_each_signaler(p__, rq__) \
+ list_for_each_entry_rcu(p__, \
+ &(rq__)->sched.signalers_list, \
+ signal_link)
+
#endif /* _I915_SCHEDULER_TYPES_H_ */
--
2.20.1
_______________________________________________
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
* [Intel-gfx] [CI 6/6] drm/i915: Show timeline dependencies for debug
2020-11-19 16:56 [Intel-gfx] [CI 1/6] drm/i915/gt: Include semaphore status in print_request() Chris Wilson
` (3 preceding siblings ...)
2020-11-19 16:56 ` [Intel-gfx] [CI 5/6] drm/i915: Lift waiter/signaler iterators Chris Wilson
@ 2020-11-19 16:56 ` Chris Wilson
2020-11-19 17:59 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [CI,1/6] drm/i915/gt: Include semaphore status in print_request() Patchwork
2020-11-19 18:30 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
6 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2020-11-19 16:56 UTC (permalink / raw)
To: intel-gfx
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Include the signalers each request in the timeline is waiting on, as a
means to try and identify the cause of a stall. This can be quite
verbose, even as for now we only show each request in the timeline and
its immediate antecedents.
This generates output like:
Timeline 886: { count 1, ready: 0, inflight: 0, seqno: { current: 664, last: 666 }, engine: rcs0 }
U 886:29a- prio=0 @ 134ms: gem_exec_parall<4621>
U bc1:27a- prio=0 @ 134ms: gem_exec_parall[4917]
Timeline 825: { count 1, ready: 0, inflight: 0, seqno: { current: 802, last: 804 }, engine: vcs0 }
U 825:324 prio=0 @ 107ms: gem_exec_parall<4518>
U b75:140- prio=0 @ 110ms: gem_exec_parall<5486>
Timeline b46: { count 1, ready: 0, inflight: 0, seqno: { current: 782, last: 784 }, engine: vcs0 }
U b46:310- prio=0 @ 70ms: gem_exec_parall<5428>
U c11:170- prio=0 @ 70ms: gem_exec_parall[5501]
Timeline 96b: { count 1, ready: 0, inflight: 0, seqno: { current: 632, last: 634 }, engine: vcs0 }
U 96b:27a- prio=0 @ 67ms: gem_exec_parall<4878>
U b75:19e- prio=0 @ 67ms: gem_exec_parall<5486>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
drivers/gpu/drm/i915/i915_debugfs.c | 3 ++-
drivers/gpu/drm/i915/i915_scheduler.c | 28 +++++++++++++++++++++++++++
drivers/gpu/drm/i915/i915_scheduler.h | 7 +++++++
3 files changed, 37 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 354b95c438d0..263074c2c097 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -45,6 +45,7 @@
#include "i915_debugfs.h"
#include "i915_debugfs_params.h"
#include "i915_irq.h"
+#include "i915_scheduler.h"
#include "i915_trace.h"
#include "intel_pm.h"
#include "intel_sideband.h"
@@ -1323,7 +1324,7 @@ static int i915_engine_info(struct seq_file *m, void *unused)
for_each_uabi_engine(engine, i915)
intel_engine_dump(engine, &p, "%s\n", engine->name);
- intel_gt_show_timelines(&i915->gt, &p, NULL);
+ intel_gt_show_timelines(&i915->gt, &p, i915_request_show_with_schedule);
intel_runtime_pm_put(&i915->runtime_pm, wakeref);
diff --git a/drivers/gpu/drm/i915/i915_scheduler.c b/drivers/gpu/drm/i915/i915_scheduler.c
index cbb880b10c65..b9cf9931ebd7 100644
--- a/drivers/gpu/drm/i915/i915_scheduler.c
+++ b/drivers/gpu/drm/i915/i915_scheduler.c
@@ -504,6 +504,34 @@ void i915_sched_node_fini(struct i915_sched_node *node)
spin_unlock_irq(&schedule_lock);
}
+void i915_request_show_with_schedule(struct drm_printer *m,
+ const struct i915_request *rq,
+ const char *prefix,
+ int indent)
+{
+ struct i915_dependency *dep;
+
+ i915_request_show(m, rq, prefix, indent);
+ if (i915_request_completed(rq))
+ return;
+
+ rcu_read_lock();
+ for_each_signaler(dep, rq) {
+ const struct i915_request *signaler =
+ node_to_request(dep->signaler);
+
+ /* Dependencies along the same timeline are expected. */
+ if (signaler->timeline == rq->timeline)
+ continue;
+
+ if (i915_request_completed(signaler))
+ continue;
+
+ i915_request_show(m, signaler, prefix, indent + 2);
+ }
+ rcu_read_unlock();
+}
+
static void i915_global_scheduler_shrink(void)
{
kmem_cache_shrink(global.slab_dependencies);
diff --git a/drivers/gpu/drm/i915/i915_scheduler.h b/drivers/gpu/drm/i915/i915_scheduler.h
index 6f0bf00fc569..4501e5ac2637 100644
--- a/drivers/gpu/drm/i915/i915_scheduler.h
+++ b/drivers/gpu/drm/i915/i915_scheduler.h
@@ -13,6 +13,8 @@
#include "i915_scheduler_types.h"
+struct drm_printer;
+
#define priolist_for_each_request(it, plist, idx) \
for (idx = 0; idx < ARRAY_SIZE((plist)->requests); idx++) \
list_for_each_entry(it, &(plist)->requests[idx], sched.link)
@@ -54,4 +56,9 @@ static inline void i915_priolist_free(struct i915_priolist *p)
__i915_priolist_free(p);
}
+void i915_request_show_with_schedule(struct drm_printer *m,
+ const struct i915_request *rq,
+ const char *prefix,
+ int indent);
+
#endif /* _I915_SCHEDULER_H_ */
--
2.20.1
_______________________________________________
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
* [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [CI,1/6] drm/i915/gt: Include semaphore status in print_request()
2020-11-19 16:56 [Intel-gfx] [CI 1/6] drm/i915/gt: Include semaphore status in print_request() Chris Wilson
` (4 preceding siblings ...)
2020-11-19 16:56 ` [Intel-gfx] [CI 6/6] drm/i915: Show timeline dependencies for debug Chris Wilson
@ 2020-11-19 17:59 ` Patchwork
2020-11-19 18:30 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
6 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2020-11-19 17:59 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: series starting with [CI,1/6] drm/i915/gt: Include semaphore status in print_request()
URL : https://patchwork.freedesktop.org/series/84073/
State : warning
== Summary ==
$ dim checkpatch origin/drm-tip
93a1f698eabf drm/i915/gt: Include semaphore status in print_request()
b4a8a32b2827 drm/i915: Lift i915_request_show()
b181d794d0c7 drm/i915/gt: Update request status flags for debug pretty-printer
d57734fd8c75 drm/i915/gt: Show all active timelines for debugging
-:12: WARNING:BAD_SIGN_OFF: Non-standard signature: Reviewd-by:
#12:
Reviewd-by: Chris Wilson <chris@chris-wilson.co.uk>
total: 0 errors, 1 warnings, 0 checks, 138 lines checked
f9256f4ad02d drm/i915: Lift waiter/signaler iterators
1761480b7c1c drm/i915: Show timeline dependencies for debug
-:13: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line)
#13:
Timeline 886: { count 1, ready: 0, inflight: 0, seqno: { current: 664, last: 666 }, engine: rcs0 }
total: 0 errors, 1 warnings, 0 checks, 66 lines checked
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Intel-gfx] [CI 4/6] drm/i915/gt: Show all active timelines for debugging
2020-11-19 16:56 ` [Intel-gfx] [CI 4/6] drm/i915/gt: Show all active timelines for debugging Chris Wilson
@ 2020-11-19 18:08 ` Tvrtko Ursulin
2020-11-19 18:11 ` Chris Wilson
0 siblings, 1 reply; 10+ messages in thread
From: Tvrtko Ursulin @ 2020-11-19 18:08 UTC (permalink / raw)
To: Chris Wilson, intel-gfx
On 19/11/2020 16:56, Chris Wilson wrote:
> Include the active timelines for debugfs/i915_engine_info, so that we
> can see which have unready requests inflight which are not shown
> otherwise.
>
> Suggested-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Reviewd-by: Chris Wilson <chris@chris-wilson.co.uk>
Wrong paste, I believe I r-b-ed this one.
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Regards,
Tvrtko
> ---
> drivers/gpu/drm/i915/gt/intel_timeline.c | 80 ++++++++++++++++++++++++
> drivers/gpu/drm/i915/gt/intel_timeline.h | 9 +++
> drivers/gpu/drm/i915/i915_debugfs.c | 16 ++---
> 3 files changed, 98 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/intel_timeline.c b/drivers/gpu/drm/i915/gt/intel_timeline.c
> index 7ea94d201fe6..512afacd2bdc 100644
> --- a/drivers/gpu/drm/i915/gt/intel_timeline.c
> +++ b/drivers/gpu/drm/i915/gt/intel_timeline.c
> @@ -617,6 +617,86 @@ void intel_gt_fini_timelines(struct intel_gt *gt)
> GEM_BUG_ON(!list_empty(&timelines->hwsp_free_list));
> }
>
> +void intel_gt_show_timelines(struct intel_gt *gt,
> + struct drm_printer *m,
> + void (*show_request)(struct drm_printer *m,
> + const struct i915_request *rq,
> + const char *prefix,
> + int indent))
> +{
> + struct intel_gt_timelines *timelines = >->timelines;
> + struct intel_timeline *tl, *tn;
> + LIST_HEAD(free);
> +
> + spin_lock(&timelines->lock);
> + list_for_each_entry_safe(tl, tn, &timelines->active_list, link) {
> + unsigned long count, ready, inflight;
> + struct i915_request *rq, *rn;
> + struct dma_fence *fence;
> +
> + if (!mutex_trylock(&tl->mutex)) {
> + drm_printf(m, "Timeline %llx: busy; skipping\n",
> + tl->fence_context);
> + continue;
> + }
> +
> + intel_timeline_get(tl);
> + GEM_BUG_ON(!atomic_read(&tl->active_count));
> + atomic_inc(&tl->active_count); /* pin the list element */
> + spin_unlock(&timelines->lock);
> +
> + count = 0;
> + ready = 0;
> + inflight = 0;
> + list_for_each_entry_safe(rq, rn, &tl->requests, link) {
> + if (i915_request_completed(rq))
> + continue;
> +
> + count++;
> + if (i915_request_is_ready(rq))
> + ready++;
> + if (i915_request_is_active(rq))
> + inflight++;
> + }
> +
> + drm_printf(m, "Timeline %llx: { ", tl->fence_context);
> + drm_printf(m, "count: %lu, ready: %lu, inflight: %lu",
> + count, ready, inflight);
> + drm_printf(m, ", seqno: { current: %d, last: %d }",
> + *tl->hwsp_seqno, tl->seqno);
> + fence = i915_active_fence_get(&tl->last_request);
> + if (fence) {
> + drm_printf(m, ", engine: %s",
> + to_request(fence)->engine->name);
> + dma_fence_put(fence);
> + }
> + drm_printf(m, " }\n");
> +
> + if (show_request) {
> + list_for_each_entry_safe(rq, rn, &tl->requests, link)
> + show_request(m, rq, "", 2);
> + }
> +
> + mutex_unlock(&tl->mutex);
> + spin_lock(&timelines->lock);
> +
> + /* Resume list iteration after reacquiring spinlock */
> + list_safe_reset_next(tl, tn, link);
> + if (atomic_dec_and_test(&tl->active_count))
> + list_del(&tl->link);
> +
> + /* Defer the final release to after the spinlock */
> + if (refcount_dec_and_test(&tl->kref.refcount)) {
> + GEM_BUG_ON(atomic_read(&tl->active_count));
> + list_add(&tl->link, &free);
> + }
> + }
> + spin_unlock(&timelines->lock);
> +
> + list_for_each_entry_safe(tl, tn, &free, link)
> + __intel_timeline_free(&tl->kref);
> +}
> +
> #if IS_ENABLED(CONFIG_DRM_I915_SELFTEST)
> #include "gt/selftests/mock_timeline.c"
> #include "gt/selftest_timeline.c"
> diff --git a/drivers/gpu/drm/i915/gt/intel_timeline.h b/drivers/gpu/drm/i915/gt/intel_timeline.h
> index 9882cd911d8e..634acebd0c4b 100644
> --- a/drivers/gpu/drm/i915/gt/intel_timeline.h
> +++ b/drivers/gpu/drm/i915/gt/intel_timeline.h
> @@ -31,6 +31,8 @@
> #include "i915_syncmap.h"
> #include "intel_timeline_types.h"
>
> +struct drm_printer;
> +
> struct intel_timeline *
> __intel_timeline_create(struct intel_gt *gt,
> struct i915_vma *global_hwsp,
> @@ -106,4 +108,11 @@ int intel_timeline_read_hwsp(struct i915_request *from,
> void intel_gt_init_timelines(struct intel_gt *gt);
> void intel_gt_fini_timelines(struct intel_gt *gt);
>
> +void intel_gt_show_timelines(struct intel_gt *gt,
> + struct drm_printer *m,
> + void (*show_request)(struct drm_printer *m,
> + const struct i915_request *rq,
> + const char *prefix,
> + int indent));
> +
> #endif
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 77e76b665098..354b95c438d0 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -1306,24 +1306,26 @@ static int i915_runtime_pm_status(struct seq_file *m, void *unused)
>
> static int i915_engine_info(struct seq_file *m, void *unused)
> {
> - struct drm_i915_private *dev_priv = node_to_i915(m->private);
> + struct drm_i915_private *i915 = node_to_i915(m->private);
> struct intel_engine_cs *engine;
> intel_wakeref_t wakeref;
> struct drm_printer p;
>
> - wakeref = intel_runtime_pm_get(&dev_priv->runtime_pm);
> + wakeref = intel_runtime_pm_get(&i915->runtime_pm);
>
> seq_printf(m, "GT awake? %s [%d]\n",
> - yesno(dev_priv->gt.awake),
> - atomic_read(&dev_priv->gt.wakeref.count));
> + yesno(i915->gt.awake),
> + atomic_read(&i915->gt.wakeref.count));
> seq_printf(m, "CS timestamp frequency: %u Hz\n",
> - RUNTIME_INFO(dev_priv)->cs_timestamp_frequency_hz);
> + RUNTIME_INFO(i915)->cs_timestamp_frequency_hz);
>
> p = drm_seq_file_printer(m);
> - for_each_uabi_engine(engine, dev_priv)
> + for_each_uabi_engine(engine, i915)
> intel_engine_dump(engine, &p, "%s\n", engine->name);
>
> - intel_runtime_pm_put(&dev_priv->runtime_pm, wakeref);
> + intel_gt_show_timelines(&i915->gt, &p, NULL);
> +
> + intel_runtime_pm_put(&i915->runtime_pm, wakeref);
>
> return 0;
> }
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Intel-gfx] [CI 4/6] drm/i915/gt: Show all active timelines for debugging
2020-11-19 18:08 ` Tvrtko Ursulin
@ 2020-11-19 18:11 ` Chris Wilson
0 siblings, 0 replies; 10+ messages in thread
From: Chris Wilson @ 2020-11-19 18:11 UTC (permalink / raw)
To: Tvrtko Ursulin, intel-gfx
Quoting Tvrtko Ursulin (2020-11-19 18:08:49)
>
> On 19/11/2020 16:56, Chris Wilson wrote:
> > Include the active timelines for debugfs/i915_engine_info, so that we
> > can see which have unready requests inflight which are not shown
> > otherwise.
> >
> > Suggested-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Reviewd-by: Chris Wilson <chris@chris-wilson.co.uk>
>
> Wrong paste, I believe I r-b-ed this one.
Pebkac. I shall have to sit in the corner for a bit.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [CI,1/6] drm/i915/gt: Include semaphore status in print_request()
2020-11-19 16:56 [Intel-gfx] [CI 1/6] drm/i915/gt: Include semaphore status in print_request() Chris Wilson
` (5 preceding siblings ...)
2020-11-19 17:59 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [CI,1/6] drm/i915/gt: Include semaphore status in print_request() Patchwork
@ 2020-11-19 18:30 ` Patchwork
6 siblings, 0 replies; 10+ messages in thread
From: Patchwork @ 2020-11-19 18:30 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
[-- Attachment #1.1: Type: text/plain, Size: 6784 bytes --]
== Series Details ==
Series: series starting with [CI,1/6] drm/i915/gt: Include semaphore status in print_request()
URL : https://patchwork.freedesktop.org/series/84073/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_9362 -> Patchwork_18942
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_18942 absolutely need to be
verified manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_18942, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18942/index.html
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_18942:
### IGT changes ###
#### Possible regressions ####
* igt@gem_exec_suspend@basic-s0:
- fi-glk-dsi: NOTRUN -> [INCOMPLETE][1]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18942/fi-glk-dsi/igt@gem_exec_suspend@basic-s0.html
New tests
---------
New tests have been introduced between CI_DRM_9362 and Patchwork_18942:
### New CI tests (1) ###
* boot:
- Statuses : 41 pass(s)
- Exec time: [0.0] s
Known issues
------------
Here are the changes found in Patchwork_18942 that come from known issues:
### CI changes ###
#### Possible fixes ####
* boot (NEW):
- {fi-tgl-dsi}: [FAIL][2] ([i915#2448]) -> [PASS][3]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9362/fi-tgl-dsi/boot.html
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18942/fi-tgl-dsi/boot.html
### IGT changes ###
#### Issues hit ####
* igt@debugfs_test@read_all_entries:
- fi-tgl-y: [PASS][4] -> [DMESG-WARN][5] ([i915#402]) +1 similar issue
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9362/fi-tgl-y/igt@debugfs_test@read_all_entries.html
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18942/fi-tgl-y/igt@debugfs_test@read_all_entries.html
* igt@i915_selftest@live@gt_heartbeat:
- fi-tgl-y: [PASS][6] -> [DMESG-FAIL][7] ([i915#2601] / [i915#541])
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9362/fi-tgl-y/igt@i915_selftest@live@gt_heartbeat.html
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18942/fi-tgl-y/igt@i915_selftest@live@gt_heartbeat.html
* igt@i915_selftest@live@gt_timelines:
- fi-apl-guc: [PASS][8] -> [INCOMPLETE][9] ([i915#1635])
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9362/fi-apl-guc/igt@i915_selftest@live@gt_timelines.html
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18942/fi-apl-guc/igt@i915_selftest@live@gt_timelines.html
* igt@kms_busy@basic@flip:
- fi-tgl-y: [PASS][10] -> [DMESG-WARN][11] ([i915#1982]) +1 similar issue
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9362/fi-tgl-y/igt@kms_busy@basic@flip.html
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18942/fi-tgl-y/igt@kms_busy@basic@flip.html
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
- fi-icl-u2: [PASS][12] -> [DMESG-WARN][13] ([i915#1982])
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9362/fi-icl-u2/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic.html
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18942/fi-icl-u2/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic.html
#### Possible fixes ####
* igt@core_hotunplug@unbind-rebind:
- fi-tgl-u2: [DMESG-WARN][14] ([i915#1982]) -> [PASS][15]
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9362/fi-tgl-u2/igt@core_hotunplug@unbind-rebind.html
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18942/fi-tgl-u2/igt@core_hotunplug@unbind-rebind.html
* igt@gem_mmap_gtt@basic:
- fi-tgl-y: [DMESG-WARN][16] ([i915#402]) -> [PASS][17] +1 similar issue
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9362/fi-tgl-y/igt@gem_mmap_gtt@basic.html
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18942/fi-tgl-y/igt@gem_mmap_gtt@basic.html
* igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic:
- fi-byt-j1900: [DMESG-WARN][18] ([i915#1982]) -> [PASS][19] +1 similar issue
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9362/fi-byt-j1900/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic.html
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18942/fi-byt-j1900/igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic.html
#### Warnings ####
* igt@i915_pm_rpm@basic-pci-d3-state:
- fi-tgl-y: [DMESG-WARN][20] ([i915#2411]) -> [DMESG-WARN][21] ([i915#1982] / [i915#2411])
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_9362/fi-tgl-y/igt@i915_pm_rpm@basic-pci-d3-state.html
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18942/fi-tgl-y/igt@i915_pm_rpm@basic-pci-d3-state.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[i915#1635]: https://gitlab.freedesktop.org/drm/intel/issues/1635
[i915#1982]: https://gitlab.freedesktop.org/drm/intel/issues/1982
[i915#2411]: https://gitlab.freedesktop.org/drm/intel/issues/2411
[i915#2448]: https://gitlab.freedesktop.org/drm/intel/issues/2448
[i915#2601]: https://gitlab.freedesktop.org/drm/intel/issues/2601
[i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402
[i915#541]: https://gitlab.freedesktop.org/drm/intel/issues/541
Participating hosts (42 -> 41)
------------------------------
Additional (3): fi-glk-dsi fi-bxt-dsi fi-cfl-guc
Missing (4): fi-ilk-m540 fi-bsw-cyan fi-bdw-samus fi-hsw-4200u
Build changes
-------------
* Linux: CI_DRM_9362 -> Patchwork_18942
CI-20190529: 20190529
CI_DRM_9362: 374246282b84ca52149ecb9a83a4ad7a515d01d9 @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_5859: 5bc1047cc8f38a9e0c5a914b6511a639b15a740e @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
Patchwork_18942: 1761480b7c1c56bb28bff325a070c86352a44352 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
1761480b7c1c drm/i915: Show timeline dependencies for debug
f9256f4ad02d drm/i915: Lift waiter/signaler iterators
d57734fd8c75 drm/i915/gt: Show all active timelines for debugging
b181d794d0c7 drm/i915/gt: Update request status flags for debug pretty-printer
b4a8a32b2827 drm/i915: Lift i915_request_show()
93a1f698eabf drm/i915/gt: Include semaphore status in print_request()
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_18942/index.html
[-- Attachment #1.2: Type: text/html, Size: 8137 bytes --]
[-- Attachment #2: Type: text/plain, Size: 160 bytes --]
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2020-11-19 18:30 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-19 16:56 [Intel-gfx] [CI 1/6] drm/i915/gt: Include semaphore status in print_request() Chris Wilson
2020-11-19 16:56 ` [Intel-gfx] [CI 2/6] drm/i915: Lift i915_request_show() Chris Wilson
2020-11-19 16:56 ` [Intel-gfx] [CI 3/6] drm/i915/gt: Update request status flags for debug pretty-printer Chris Wilson
2020-11-19 16:56 ` [Intel-gfx] [CI 4/6] drm/i915/gt: Show all active timelines for debugging Chris Wilson
2020-11-19 18:08 ` Tvrtko Ursulin
2020-11-19 18:11 ` Chris Wilson
2020-11-19 16:56 ` [Intel-gfx] [CI 5/6] drm/i915: Lift waiter/signaler iterators Chris Wilson
2020-11-19 16:56 ` [Intel-gfx] [CI 6/6] drm/i915: Show timeline dependencies for debug Chris Wilson
2020-11-19 17:59 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [CI,1/6] drm/i915/gt: Include semaphore status in print_request() Patchwork
2020-11-19 18:30 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).