* [PATCH] drm/i915: Add in-flight request details to intel_engine_dump()
@ 2017-10-15 20:43 Chris Wilson
2017-10-15 21:05 ` ✓ Fi.CI.BAT: success for " Patchwork
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Chris Wilson @ 2017-10-15 20:43 UTC (permalink / raw)
To: intel-gfx
In the intel_engine_cs dumper, we were showing the request details for
the request queue but not of those requests already passed to the hw
(just a summary of the seqno). If we show those details, we can then
eliminate the entirely redundant and forgotten debugfs/i915_gem_request
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Jeff McGee <jeff.mcgee@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
---
drivers/gpu/drm/i915/i915_debugfs.c | 49 ----------------------------------
drivers/gpu/drm/i915/intel_engine_cs.c | 35 +++++++++++++-----------
2 files changed, 19 insertions(+), 65 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 0bb6e01121fc..bb7261266773 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -643,54 +643,6 @@ static int i915_gem_batch_pool_info(struct seq_file *m, void *data)
return 0;
}
-static void print_request(struct seq_file *m,
- struct drm_i915_gem_request *rq,
- const char *prefix)
-{
- seq_printf(m, "%s%x [%x:%x] prio=%d @ %dms: %s\n", prefix,
- rq->global_seqno, rq->ctx->hw_id, rq->fence.seqno,
- rq->priotree.priority,
- jiffies_to_msecs(jiffies - rq->emitted_jiffies),
- rq->timeline->common->name);
-}
-
-static int i915_gem_request_info(struct seq_file *m, void *data)
-{
- struct drm_i915_private *dev_priv = node_to_i915(m->private);
- struct drm_device *dev = &dev_priv->drm;
- struct drm_i915_gem_request *req;
- struct intel_engine_cs *engine;
- enum intel_engine_id id;
- int ret, any;
-
- ret = mutex_lock_interruptible(&dev->struct_mutex);
- if (ret)
- return ret;
-
- any = 0;
- for_each_engine(engine, dev_priv, id) {
- int count;
-
- count = 0;
- list_for_each_entry(req, &engine->timeline->requests, link)
- count++;
- if (count == 0)
- continue;
-
- seq_printf(m, "%s requests: %d\n", engine->name, count);
- list_for_each_entry(req, &engine->timeline->requests, link)
- print_request(m, req, " ");
-
- any++;
- }
- mutex_unlock(&dev->struct_mutex);
-
- if (any == 0)
- seq_puts(m, "No requests\n");
-
- return 0;
-}
-
static void i915_ring_seqno_info(struct seq_file *m,
struct intel_engine_cs *engine)
{
@@ -4753,7 +4705,6 @@ static const struct drm_info_list i915_debugfs_list[] = {
{"i915_gem_gtt", i915_gem_gtt_info, 0},
{"i915_gem_pin_display", i915_gem_gtt_info, 0, (void *)1},
{"i915_gem_stolen", i915_gem_stolen_list_info },
- {"i915_gem_request", i915_gem_request_info, 0},
{"i915_gem_seqno", i915_gem_seqno_info, 0},
{"i915_gem_fence_regs", i915_gem_fence_regs_info, 0},
{"i915_gem_interrupt", i915_interrupt_info, 0},
diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c b/drivers/gpu/drm/i915/intel_engine_cs.c
index a59b2a30ff5a..52340b56d898 100644
--- a/drivers/gpu/drm/i915/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/intel_engine_cs.c
@@ -1622,8 +1622,10 @@ static void print_request(struct drm_printer *m,
struct drm_i915_gem_request *rq,
const char *prefix)
{
- drm_printf(m, "%s%x [%x:%x] prio=%d @ %dms: %s\n", prefix,
- rq->global_seqno, rq->ctx->hw_id, rq->fence.seqno,
+ drm_printf(m, "%s%x%s [%x:%x] prio=%d @ %dms: %s\n", prefix,
+ rq->global_seqno,
+ i915_gem_request_completed(rq) ? "!" : "",
+ rq->ctx->hw_id, rq->fence.seqno,
rq->priotree.priority,
jiffies_to_msecs(jiffies - rq->emitted_jiffies),
rq->timeline->common->name);
@@ -1631,8 +1633,9 @@ static void print_request(struct drm_printer *m,
void intel_engine_dump(struct intel_engine_cs *engine, struct drm_printer *m)
{
- struct intel_breadcrumbs *b = &engine->breadcrumbs;
- struct i915_gpu_error *error = &engine->i915->gpu_error;
+ struct intel_breadcrumbs * const b = &engine->breadcrumbs;
+ const struct intel_engine_execlists * const execlists = &engine->execlists;
+ struct i915_gpu_error * const error = &engine->i915->gpu_error;
struct drm_i915_private *dev_priv = engine->i915;
struct drm_i915_gem_request *rq;
struct rb_node *rb;
@@ -1696,7 +1699,6 @@ void intel_engine_dump(struct intel_engine_cs *engine, struct drm_printer *m)
if (i915_modparams.enable_execlists) {
const u32 *hws = &engine->status_page.page_addr[I915_HWS_CSB_BUF0_INDEX];
- struct intel_engine_execlists * const execlists = &engine->execlists;
u32 ptr, read, write;
unsigned int idx;
@@ -1744,17 +1746,6 @@ void intel_engine_dump(struct intel_engine_cs *engine, struct drm_printer *m)
}
}
rcu_read_unlock();
-
- spin_lock_irq(&engine->timeline->lock);
- for (rb = execlists->first; rb; rb = rb_next(rb)) {
- struct i915_priolist *p =
- rb_entry(rb, typeof(*p), node);
-
- list_for_each_entry(rq, &p->requests,
- priotree.link)
- print_request(m, rq, "\t\tQ ");
- }
- spin_unlock_irq(&engine->timeline->lock);
} else if (INTEL_GEN(dev_priv) > 6) {
drm_printf(m, "\tPP_DIR_BASE: 0x%08x\n",
I915_READ(RING_PP_DIR_BASE(engine)));
@@ -1764,6 +1755,18 @@ void intel_engine_dump(struct intel_engine_cs *engine, struct drm_printer *m)
I915_READ(RING_PP_DIR_DCLV(engine)));
}
+ spin_lock_irq(&engine->timeline->lock);
+ list_for_each_entry(rq, &engine->timeline->requests, link)
+ print_request(m, rq, "\t\tE ");
+ for (rb = execlists->first; rb; rb = rb_next(rb)) {
+ struct i915_priolist *p =
+ rb_entry(rb, typeof(*p), node);
+
+ list_for_each_entry(rq, &p->requests, priotree.link)
+ print_request(m, rq, "\t\tQ ");
+ }
+ spin_unlock_irq(&engine->timeline->lock);
+
spin_lock_irq(&b->rb_lock);
for (rb = rb_first(&b->waiters); rb; rb = rb_next(rb)) {
struct intel_wait *w = rb_entry(rb, typeof(*w), node);
--
2.15.0.rc0
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 5+ messages in thread
* ✓ Fi.CI.BAT: success for drm/i915: Add in-flight request details to intel_engine_dump()
2017-10-15 20:43 [PATCH] drm/i915: Add in-flight request details to intel_engine_dump() Chris Wilson
@ 2017-10-15 21:05 ` Patchwork
2017-10-15 22:09 ` ✗ Fi.CI.IGT: warning " Patchwork
2017-10-16 16:10 ` [PATCH] " Jeff McGee
2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2017-10-15 21:05 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Add in-flight request details to intel_engine_dump()
URL : https://patchwork.freedesktop.org/series/32001/
State : success
== Summary ==
Series 32001v1 drm/i915: Add in-flight request details to intel_engine_dump()
https://patchwork.freedesktop.org/api/1.0/series/32001/revisions/1/mbox/
fi-bdw-5557u total:289 pass:268 dwarn:0 dfail:0 fail:0 skip:21 time:460s
fi-bdw-gvtdvm total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:477s
fi-blb-e6850 total:289 pass:223 dwarn:1 dfail:0 fail:0 skip:65 time:387s
fi-bsw-n3050 total:289 pass:243 dwarn:0 dfail:0 fail:0 skip:46 time:566s
fi-bwr-2160 total:289 pass:183 dwarn:0 dfail:0 fail:0 skip:106 time:286s
fi-bxt-dsi total:289 pass:259 dwarn:0 dfail:0 fail:0 skip:30 time:523s
fi-bxt-j4205 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:522s
fi-byt-j1900 total:289 pass:253 dwarn:1 dfail:0 fail:0 skip:35 time:533s
fi-byt-n2820 total:289 pass:249 dwarn:1 dfail:0 fail:0 skip:39 time:520s
fi-cfl-s total:289 pass:253 dwarn:4 dfail:0 fail:0 skip:32 time:566s
fi-elk-e7500 total:289 pass:229 dwarn:0 dfail:0 fail:0 skip:60 time:430s
fi-gdg-551 total:289 pass:178 dwarn:1 dfail:0 fail:1 skip:109 time:271s
fi-glk-1 total:289 pass:261 dwarn:0 dfail:0 fail:0 skip:28 time:597s
fi-hsw-4770r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:435s
fi-ilk-650 total:289 pass:228 dwarn:0 dfail:0 fail:0 skip:61 time:461s
fi-ivb-3520m total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:503s
fi-ivb-3770 total:289 pass:260 dwarn:0 dfail:0 fail:0 skip:29 time:474s
fi-kbl-7500u total:289 pass:264 dwarn:1 dfail:0 fail:0 skip:24 time:503s
fi-kbl-7567u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:488s
fi-kbl-r total:289 pass:262 dwarn:0 dfail:0 fail:0 skip:27 time:590s
fi-pnv-d510 total:289 pass:222 dwarn:1 dfail:0 fail:0 skip:66 time:650s
fi-skl-6260u total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:466s
fi-skl-6700hq total:289 pass:263 dwarn:0 dfail:0 fail:0 skip:26 time:656s
fi-skl-6700k total:289 pass:265 dwarn:0 dfail:0 fail:0 skip:24 time:538s
fi-skl-6770hq total:289 pass:269 dwarn:0 dfail:0 fail:0 skip:20 time:513s
fi-skl-gvtdvm total:289 pass:266 dwarn:0 dfail:0 fail:0 skip:23 time:479s
fi-snb-2520m total:289 pass:250 dwarn:0 dfail:0 fail:0 skip:39 time:586s
fi-snb-2600 total:289 pass:249 dwarn:0 dfail:0 fail:0 skip:40 time:432s
3d7ee91be487380ef6cad329fafbe424f6885372 drm-tip: 2017y-10m-14d-00h-14m-47s UTC integration manifest
8333c87c8e5b drm/i915: Add in-flight request details to intel_engine_dump()
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_6043/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* ✗ Fi.CI.IGT: warning for drm/i915: Add in-flight request details to intel_engine_dump()
2017-10-15 20:43 [PATCH] drm/i915: Add in-flight request details to intel_engine_dump() Chris Wilson
2017-10-15 21:05 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2017-10-15 22:09 ` Patchwork
2017-10-16 16:10 ` [PATCH] " Jeff McGee
2 siblings, 0 replies; 5+ messages in thread
From: Patchwork @ 2017-10-15 22:09 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: Add in-flight request details to intel_engine_dump()
URL : https://patchwork.freedesktop.org/series/32001/
State : warning
== Summary ==
Test kms_plane:
Subgroup plane-panning-bottom-right-suspend-pipe-C-planes:
skip -> PASS (shard-hsw)
Test kms_frontbuffer_tracking:
Subgroup fbc-rgb101010-draw-mmap-gtt:
skip -> PASS (shard-hsw)
Test kms_flip:
Subgroup modeset-vs-vblank-race-interruptible:
pass -> DMESG-WARN (shard-hsw)
shard-hsw total:2553 pass:1440 dwarn:1 dfail:0 fail:9 skip:1103 time:9630s
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_6043/shards.html
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/i915: Add in-flight request details to intel_engine_dump()
2017-10-15 20:43 [PATCH] drm/i915: Add in-flight request details to intel_engine_dump() Chris Wilson
2017-10-15 21:05 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-10-15 22:09 ` ✗ Fi.CI.IGT: warning " Patchwork
@ 2017-10-16 16:10 ` Jeff McGee
2017-10-16 20:13 ` Chris Wilson
2 siblings, 1 reply; 5+ messages in thread
From: Jeff McGee @ 2017-10-16 16:10 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
On Sun, Oct 15, 2017 at 09:43:10PM +0100, Chris Wilson wrote:
> In the intel_engine_cs dumper, we were showing the request details for
> the request queue but not of those requests already passed to the hw
> (just a summary of the seqno). If we show those details, we can then
> eliminate the entirely redundant and forgotten debugfs/i915_gem_request
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Jeff McGee <jeff.mcgee@intel.com>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> ---
Reviewed-by: Jeff McGee <jeff.mcgee@intel.com>
> drivers/gpu/drm/i915/i915_debugfs.c | 49 ----------------------------------
> drivers/gpu/drm/i915/intel_engine_cs.c | 35 +++++++++++++-----------
> 2 files changed, 19 insertions(+), 65 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
> index 0bb6e01121fc..bb7261266773 100644
> --- a/drivers/gpu/drm/i915/i915_debugfs.c
> +++ b/drivers/gpu/drm/i915/i915_debugfs.c
> @@ -643,54 +643,6 @@ static int i915_gem_batch_pool_info(struct seq_file *m, void *data)
> return 0;
> }
>
> -static void print_request(struct seq_file *m,
> - struct drm_i915_gem_request *rq,
> - const char *prefix)
> -{
> - seq_printf(m, "%s%x [%x:%x] prio=%d @ %dms: %s\n", prefix,
> - rq->global_seqno, rq->ctx->hw_id, rq->fence.seqno,
> - rq->priotree.priority,
> - jiffies_to_msecs(jiffies - rq->emitted_jiffies),
> - rq->timeline->common->name);
> -}
> -
> -static int i915_gem_request_info(struct seq_file *m, void *data)
> -{
> - struct drm_i915_private *dev_priv = node_to_i915(m->private);
> - struct drm_device *dev = &dev_priv->drm;
> - struct drm_i915_gem_request *req;
> - struct intel_engine_cs *engine;
> - enum intel_engine_id id;
> - int ret, any;
> -
> - ret = mutex_lock_interruptible(&dev->struct_mutex);
> - if (ret)
> - return ret;
> -
> - any = 0;
> - for_each_engine(engine, dev_priv, id) {
> - int count;
> -
> - count = 0;
> - list_for_each_entry(req, &engine->timeline->requests, link)
> - count++;
> - if (count == 0)
> - continue;
> -
> - seq_printf(m, "%s requests: %d\n", engine->name, count);
> - list_for_each_entry(req, &engine->timeline->requests, link)
> - print_request(m, req, " ");
> -
> - any++;
> - }
> - mutex_unlock(&dev->struct_mutex);
> -
> - if (any == 0)
> - seq_puts(m, "No requests\n");
> -
> - return 0;
> -}
> -
> static void i915_ring_seqno_info(struct seq_file *m,
> struct intel_engine_cs *engine)
> {
> @@ -4753,7 +4705,6 @@ static const struct drm_info_list i915_debugfs_list[] = {
> {"i915_gem_gtt", i915_gem_gtt_info, 0},
> {"i915_gem_pin_display", i915_gem_gtt_info, 0, (void *)1},
> {"i915_gem_stolen", i915_gem_stolen_list_info },
> - {"i915_gem_request", i915_gem_request_info, 0},
> {"i915_gem_seqno", i915_gem_seqno_info, 0},
> {"i915_gem_fence_regs", i915_gem_fence_regs_info, 0},
> {"i915_gem_interrupt", i915_interrupt_info, 0},
> diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c b/drivers/gpu/drm/i915/intel_engine_cs.c
> index a59b2a30ff5a..52340b56d898 100644
> --- a/drivers/gpu/drm/i915/intel_engine_cs.c
> +++ b/drivers/gpu/drm/i915/intel_engine_cs.c
> @@ -1622,8 +1622,10 @@ static void print_request(struct drm_printer *m,
> struct drm_i915_gem_request *rq,
> const char *prefix)
> {
> - drm_printf(m, "%s%x [%x:%x] prio=%d @ %dms: %s\n", prefix,
> - rq->global_seqno, rq->ctx->hw_id, rq->fence.seqno,
> + drm_printf(m, "%s%x%s [%x:%x] prio=%d @ %dms: %s\n", prefix,
> + rq->global_seqno,
> + i915_gem_request_completed(rq) ? "!" : "",
> + rq->ctx->hw_id, rq->fence.seqno,
> rq->priotree.priority,
> jiffies_to_msecs(jiffies - rq->emitted_jiffies),
> rq->timeline->common->name);
> @@ -1631,8 +1633,9 @@ static void print_request(struct drm_printer *m,
>
> void intel_engine_dump(struct intel_engine_cs *engine, struct drm_printer *m)
> {
> - struct intel_breadcrumbs *b = &engine->breadcrumbs;
> - struct i915_gpu_error *error = &engine->i915->gpu_error;
> + struct intel_breadcrumbs * const b = &engine->breadcrumbs;
> + const struct intel_engine_execlists * const execlists = &engine->execlists;
> + struct i915_gpu_error * const error = &engine->i915->gpu_error;
> struct drm_i915_private *dev_priv = engine->i915;
> struct drm_i915_gem_request *rq;
> struct rb_node *rb;
> @@ -1696,7 +1699,6 @@ void intel_engine_dump(struct intel_engine_cs *engine, struct drm_printer *m)
>
> if (i915_modparams.enable_execlists) {
> const u32 *hws = &engine->status_page.page_addr[I915_HWS_CSB_BUF0_INDEX];
> - struct intel_engine_execlists * const execlists = &engine->execlists;
> u32 ptr, read, write;
> unsigned int idx;
>
> @@ -1744,17 +1746,6 @@ void intel_engine_dump(struct intel_engine_cs *engine, struct drm_printer *m)
> }
> }
> rcu_read_unlock();
> -
> - spin_lock_irq(&engine->timeline->lock);
> - for (rb = execlists->first; rb; rb = rb_next(rb)) {
> - struct i915_priolist *p =
> - rb_entry(rb, typeof(*p), node);
> -
> - list_for_each_entry(rq, &p->requests,
> - priotree.link)
> - print_request(m, rq, "\t\tQ ");
> - }
> - spin_unlock_irq(&engine->timeline->lock);
> } else if (INTEL_GEN(dev_priv) > 6) {
> drm_printf(m, "\tPP_DIR_BASE: 0x%08x\n",
> I915_READ(RING_PP_DIR_BASE(engine)));
> @@ -1764,6 +1755,18 @@ void intel_engine_dump(struct intel_engine_cs *engine, struct drm_printer *m)
> I915_READ(RING_PP_DIR_DCLV(engine)));
> }
>
> + spin_lock_irq(&engine->timeline->lock);
> + list_for_each_entry(rq, &engine->timeline->requests, link)
> + print_request(m, rq, "\t\tE ");
> + for (rb = execlists->first; rb; rb = rb_next(rb)) {
> + struct i915_priolist *p =
> + rb_entry(rb, typeof(*p), node);
> +
> + list_for_each_entry(rq, &p->requests, priotree.link)
> + print_request(m, rq, "\t\tQ ");
> + }
> + spin_unlock_irq(&engine->timeline->lock);
> +
> spin_lock_irq(&b->rb_lock);
> for (rb = rb_first(&b->waiters); rb; rb = rb_next(rb)) {
> struct intel_wait *w = rb_entry(rb, typeof(*w), node);
> --
> 2.15.0.rc0
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/i915: Add in-flight request details to intel_engine_dump()
2017-10-16 16:10 ` [PATCH] " Jeff McGee
@ 2017-10-16 20:13 ` Chris Wilson
0 siblings, 0 replies; 5+ messages in thread
From: Chris Wilson @ 2017-10-16 20:13 UTC (permalink / raw)
To: Jeff McGee; +Cc: intel-gfx
Quoting Jeff McGee (2017-10-16 17:10:20)
> On Sun, Oct 15, 2017 at 09:43:10PM +0100, Chris Wilson wrote:
> > In the intel_engine_cs dumper, we were showing the request details for
> > the request queue but not of those requests already passed to the hw
> > (just a summary of the seqno). If we show those details, we can then
> > eliminate the entirely redundant and forgotten debugfs/i915_gem_request
> >
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Jeff McGee <jeff.mcgee@intel.com>
> > Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> > ---
>
> Reviewed-by: Jeff McGee <jeff.mcgee@intel.com>
Thanks for pointing out the broken code and the review of its
replacement,
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-10-16 20:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-15 20:43 [PATCH] drm/i915: Add in-flight request details to intel_engine_dump() Chris Wilson
2017-10-15 21:05 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-10-15 22:09 ` ✗ Fi.CI.IGT: warning " Patchwork
2017-10-16 16:10 ` [PATCH] " Jeff McGee
2017-10-16 20:13 ` Chris Wilson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox