* [PATCH] drm/i915: Dump the whole context object.
@ 2014-04-05 21:55 Ben Widawsky
2014-04-07 6:24 ` Daniel Vetter
0 siblings, 1 reply; 2+ messages in thread
From: Ben Widawsky @ 2014-04-05 21:55 UTC (permalink / raw)
To: Intel GFX
As we've learned over time, the HW context is just a series of GPU
commands that we're able to decode without intel_error_decode. Since
many bugs recently have been implicated in the HW context state, it
makes sense to dump the whole context object in a form which can be
parsed.
Sample:
render ring --- HW Context = 0x042db000
ringbuffer (render ring) at 0x0160c000; HEAD points to: 0x0160c000
0x0160c000: 0x00000000: MI_NOOP
0x0160c004: 0x00000000: MI_NOOP
0x0160c008: 0x00000000: MI_NOOP
0x0160c00c: 0x00000000: MI_NOOP
0x0160c010: 0x00000000: MI_NOOP
0x0160c014: 0x00000000: MI_NOOP
0x0160c018: 0x00000000: MI_NOOP
0x0160c01c: 0x00000000: MI_NOOP
Unfortunately, our decoder isn't quite smart enough to deal with the
variable length LRIs - but that is a tools problem.
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
---
drivers/gpu/drm/i915/i915_gpu_error.c | 16 ++--------------
1 file changed, 2 insertions(+), 14 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c
index f7a2c65..481a7d1 100644
--- a/drivers/gpu/drm/i915/i915_gpu_error.c
+++ b/drivers/gpu/drm/i915/i915_gpu_error.c
@@ -452,16 +452,7 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m,
err_printf(m, "%s --- HW Context = 0x%08x\n",
dev_priv->ring[i].name,
obj->gtt_offset);
- offset = 0;
- for (elt = 0; elt < PAGE_SIZE/16; elt += 4) {
- err_printf(m, "[%04x] %08x %08x %08x %08x\n",
- offset,
- obj->pages[0][elt],
- obj->pages[0][elt+1],
- obj->pages[0][elt+2],
- obj->pages[0][elt+3]);
- offset += 16;
- }
+ print_error_obj(m, obj);
}
}
@@ -927,10 +918,7 @@ static void i915_gem_record_active_context(struct intel_ring_buffer *ring,
list_for_each_entry(obj, &dev_priv->mm.bound_list, global_list) {
if ((error->ccid & PAGE_MASK) == i915_gem_obj_ggtt_offset(obj)) {
- ering->ctx = i915_error_object_create_sized(dev_priv,
- obj,
- &dev_priv->gtt.base,
- 1);
+ ering->ctx = i915_error_ggtt_object_create(dev_priv, obj);
break;
}
}
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] drm/i915: Dump the whole context object.
2014-04-05 21:55 [PATCH] drm/i915: Dump the whole context object Ben Widawsky
@ 2014-04-07 6:24 ` Daniel Vetter
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Vetter @ 2014-04-07 6:24 UTC (permalink / raw)
To: Ben Widawsky; +Cc: Intel GFX
On Sat, Apr 05, 2014 at 02:55:53PM -0700, Ben Widawsky wrote:
> As we've learned over time, the HW context is just a series of GPU
> commands that we're able to decode without intel_error_decode. Since
Correct to "... without any changes in intel_error_decode. ..." since I
presumed that's what you wanted to say.
> many bugs recently have been implicated in the HW context state, it
> makes sense to dump the whole context object in a form which can be
> parsed.
>
> Sample:
> render ring --- HW Context = 0x042db000
> ringbuffer (render ring) at 0x0160c000; HEAD points to: 0x0160c000
> 0x0160c000: 0x00000000: MI_NOOP
> 0x0160c004: 0x00000000: MI_NOOP
> 0x0160c008: 0x00000000: MI_NOOP
> 0x0160c00c: 0x00000000: MI_NOOP
> 0x0160c010: 0x00000000: MI_NOOP
> 0x0160c014: 0x00000000: MI_NOOP
> 0x0160c018: 0x00000000: MI_NOOP
> 0x0160c01c: 0x00000000: MI_NOOP
>
> Unfortunately, our decoder isn't quite smart enough to deal with the
> variable length LRIs - but that is a tools problem.
>
> Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
Queued for -next, thanks for the patch.
-Daniel
> ---
> drivers/gpu/drm/i915/i915_gpu_error.c | 16 ++--------------
> 1 file changed, 2 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c
> index f7a2c65..481a7d1 100644
> --- a/drivers/gpu/drm/i915/i915_gpu_error.c
> +++ b/drivers/gpu/drm/i915/i915_gpu_error.c
> @@ -452,16 +452,7 @@ int i915_error_state_to_str(struct drm_i915_error_state_buf *m,
> err_printf(m, "%s --- HW Context = 0x%08x\n",
> dev_priv->ring[i].name,
> obj->gtt_offset);
> - offset = 0;
> - for (elt = 0; elt < PAGE_SIZE/16; elt += 4) {
> - err_printf(m, "[%04x] %08x %08x %08x %08x\n",
> - offset,
> - obj->pages[0][elt],
> - obj->pages[0][elt+1],
> - obj->pages[0][elt+2],
> - obj->pages[0][elt+3]);
> - offset += 16;
> - }
> + print_error_obj(m, obj);
> }
> }
>
> @@ -927,10 +918,7 @@ static void i915_gem_record_active_context(struct intel_ring_buffer *ring,
>
> list_for_each_entry(obj, &dev_priv->mm.bound_list, global_list) {
> if ((error->ccid & PAGE_MASK) == i915_gem_obj_ggtt_offset(obj)) {
> - ering->ctx = i915_error_object_create_sized(dev_priv,
> - obj,
> - &dev_priv->gtt.base,
> - 1);
> + ering->ctx = i915_error_ggtt_object_create(dev_priv, obj);
> break;
> }
> }
> --
> 1.9.1
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-04-07 6:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-05 21:55 [PATCH] drm/i915: Dump the whole context object Ben Widawsky
2014-04-07 6:24 ` Daniel Vetter
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.