diff options
author | Oscar Mateo <oscar.mateo@intel.com> | 2014-07-24 12:04:46 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-08-20 11:17:50 -0400 |
commit | c9fe99bd4c4f8730207fed5e863d8f25224fd20b (patch) | |
tree | 524f05878b0b55b70d6a9b18cf1c70a3f54b4cc4 | |
parent | 4ba70e448be91f52032595678c306e4aee2fae5c (diff) |
drm/i915/bdw: Display context backing obj & ringbuffer info in debugfs
Signed-off-by: Oscar Mateo <oscar.mateo@intel.com>
Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
[danvet: Checkpatch.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r-- | drivers/gpu/drm/i915/i915_debugfs.c | 37 |
1 files changed, 33 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 68335813ef4c..4f279cfe67b8 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c | |||
@@ -1677,6 +1677,14 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data) | |||
1677 | return 0; | 1677 | return 0; |
1678 | } | 1678 | } |
1679 | 1679 | ||
1680 | static void describe_ctx_ringbuf(struct seq_file *m, | ||
1681 | struct intel_ringbuffer *ringbuf) | ||
1682 | { | ||
1683 | seq_printf(m, " (ringbuffer, space: %d, head: %u, tail: %u, last head: %d)", | ||
1684 | ringbuf->space, ringbuf->head, ringbuf->tail, | ||
1685 | ringbuf->last_retired_head); | ||
1686 | } | ||
1687 | |||
1680 | static int i915_context_status(struct seq_file *m, void *unused) | 1688 | static int i915_context_status(struct seq_file *m, void *unused) |
1681 | { | 1689 | { |
1682 | struct drm_info_node *node = m->private; | 1690 | struct drm_info_node *node = m->private; |
@@ -1703,16 +1711,37 @@ static int i915_context_status(struct seq_file *m, void *unused) | |||
1703 | } | 1711 | } |
1704 | 1712 | ||
1705 | list_for_each_entry(ctx, &dev_priv->context_list, link) { | 1713 | list_for_each_entry(ctx, &dev_priv->context_list, link) { |
1706 | if (ctx->legacy_hw_ctx.rcs_state == NULL) | 1714 | if (!i915.enable_execlists && |
1715 | ctx->legacy_hw_ctx.rcs_state == NULL) | ||
1707 | continue; | 1716 | continue; |
1708 | 1717 | ||
1709 | seq_puts(m, "HW context "); | 1718 | seq_puts(m, "HW context "); |
1710 | describe_ctx(m, ctx); | 1719 | describe_ctx(m, ctx); |
1711 | for_each_ring(ring, dev_priv, i) | 1720 | for_each_ring(ring, dev_priv, i) { |
1712 | if (ring->default_context == ctx) | 1721 | if (ring->default_context == ctx) |
1713 | seq_printf(m, "(default context %s) ", ring->name); | 1722 | seq_printf(m, "(default context %s) ", |
1723 | ring->name); | ||
1724 | } | ||
1725 | |||
1726 | if (i915.enable_execlists) { | ||
1727 | seq_putc(m, '\n'); | ||
1728 | for_each_ring(ring, dev_priv, i) { | ||
1729 | struct drm_i915_gem_object *ctx_obj = | ||
1730 | ctx->engine[i].state; | ||
1731 | struct intel_ringbuffer *ringbuf = | ||
1732 | ctx->engine[i].ringbuf; | ||
1733 | |||
1734 | seq_printf(m, "%s: ", ring->name); | ||
1735 | if (ctx_obj) | ||
1736 | describe_obj(m, ctx_obj); | ||
1737 | if (ringbuf) | ||
1738 | describe_ctx_ringbuf(m, ringbuf); | ||
1739 | seq_putc(m, '\n'); | ||
1740 | } | ||
1741 | } else { | ||
1742 | describe_obj(m, ctx->legacy_hw_ctx.rcs_state); | ||
1743 | } | ||
1714 | 1744 | ||
1715 | describe_obj(m, ctx->legacy_hw_ctx.rcs_state); | ||
1716 | seq_putc(m, '\n'); | 1745 | seq_putc(m, '\n'); |
1717 | } | 1746 | } |
1718 | 1747 | ||