aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_debugfs.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-11-01 07:35:28 -0400
committerChris Wilson <chris@chris-wilson.co.uk>2010-11-01 08:08:05 -0400
commite5c652603680404683fd1f262b511340545179a2 (patch)
tree4785854a2b54eb94c91a4017833971ee049ae356 /drivers/gpu/drm/i915/i915_debugfs.c
parent100519e2f1c20286158746f92f27c3aa14f5a893 (diff)
drm/i915/debugfs: Report ring in error state
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_debugfs.c')
-rw-r--r--drivers/gpu/drm/i915/i915_debugfs.c62
1 files changed, 34 insertions, 28 deletions
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 56f7ced16f1..9cb6061bf9d 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -32,6 +32,7 @@
32#include "drmP.h" 32#include "drmP.h"
33#include "drm.h" 33#include "drm.h"
34#include "intel_drv.h" 34#include "intel_drv.h"
35#include "intel_ringbuffer.h"
35#include "i915_drm.h" 36#include "i915_drm.h"
36#include "i915_drv.h" 37#include "i915_drv.h"
37 38
@@ -48,12 +49,6 @@ enum {
48 DEFERRED_FREE_LIST, 49 DEFERRED_FREE_LIST,
49}; 50};
50 51
51enum {
52 RENDER_RING,
53 BSD_RING,
54 BLT_RING,
55};
56
57static const char *yesno(int v) 52static const char *yesno(int v)
58{ 53{
59 return v ? "yes" : "no"; 54 return v ? "yes" : "no";
@@ -450,9 +445,9 @@ static int i915_hws_info(struct seq_file *m, void *data)
450 int i; 445 int i;
451 446
452 switch ((uintptr_t)node->info_ent->data) { 447 switch ((uintptr_t)node->info_ent->data) {
453 case RENDER_RING: ring = &dev_priv->render_ring; break; 448 case RING_RENDER: ring = &dev_priv->render_ring; break;
454 case BSD_RING: ring = &dev_priv->bsd_ring; break; 449 case RING_BSD: ring = &dev_priv->bsd_ring; break;
455 case BLT_RING: ring = &dev_priv->blt_ring; break; 450 case RING_BLT: ring = &dev_priv->blt_ring; break;
456 default: return -EINVAL; 451 default: return -EINVAL;
457 } 452 }
458 453
@@ -520,9 +515,9 @@ static int i915_ringbuffer_data(struct seq_file *m, void *data)
520 int ret; 515 int ret;
521 516
522 switch ((uintptr_t)node->info_ent->data) { 517 switch ((uintptr_t)node->info_ent->data) {
523 case RENDER_RING: ring = &dev_priv->render_ring; break; 518 case RING_RENDER: ring = &dev_priv->render_ring; break;
524 case BSD_RING: ring = &dev_priv->bsd_ring; break; 519 case RING_BSD: ring = &dev_priv->bsd_ring; break;
525 case BLT_RING: ring = &dev_priv->blt_ring; break; 520 case RING_BLT: ring = &dev_priv->blt_ring; break;
526 default: return -EINVAL; 521 default: return -EINVAL;
527 } 522 }
528 523
@@ -554,9 +549,9 @@ static int i915_ringbuffer_info(struct seq_file *m, void *data)
554 struct intel_ring_buffer *ring; 549 struct intel_ring_buffer *ring;
555 550
556 switch ((uintptr_t)node->info_ent->data) { 551 switch ((uintptr_t)node->info_ent->data) {
557 case RENDER_RING: ring = &dev_priv->render_ring; break; 552 case RING_RENDER: ring = &dev_priv->render_ring; break;
558 case BSD_RING: ring = &dev_priv->bsd_ring; break; 553 case RING_BSD: ring = &dev_priv->bsd_ring; break;
559 case BLT_RING: ring = &dev_priv->blt_ring; break; 554 case RING_BLT: ring = &dev_priv->blt_ring; break;
560 default: return -EINVAL; 555 default: return -EINVAL;
561 } 556 }
562 557
@@ -574,6 +569,16 @@ static int i915_ringbuffer_info(struct seq_file *m, void *data)
574 return 0; 569 return 0;
575} 570}
576 571
572static const char *ring_str(int ring)
573{
574 switch (ring) {
575 case RING_RENDER: return "render";
576 case RING_BSD: return "bsd";
577 case RING_BLT: return "blt";
578 default: return "";
579 }
580}
581
577static const char *pin_flag(int pinned) 582static const char *pin_flag(int pinned)
578{ 583{
579 if (pinned > 0) 584 if (pinned > 0)
@@ -630,14 +635,14 @@ static int i915_error_state(struct seq_file *m, void *unused)
630 seq_printf(m, "ERROR: 0x%08x\n", error->error); 635 seq_printf(m, "ERROR: 0x%08x\n", error->error);
631 seq_printf(m, "Blitter command stream:\n"); 636 seq_printf(m, "Blitter command stream:\n");
632 seq_printf(m, " ACTHD: 0x%08x\n", error->bcs_acthd); 637 seq_printf(m, " ACTHD: 0x%08x\n", error->bcs_acthd);
633 seq_printf(m, " IPEHR: 0x%08x\n", error->bcs_ipehr);
634 seq_printf(m, " IPEIR: 0x%08x\n", error->bcs_ipeir); 638 seq_printf(m, " IPEIR: 0x%08x\n", error->bcs_ipeir);
639 seq_printf(m, " IPEHR: 0x%08x\n", error->bcs_ipehr);
635 seq_printf(m, " INSTDONE: 0x%08x\n", error->bcs_instdone); 640 seq_printf(m, " INSTDONE: 0x%08x\n", error->bcs_instdone);
636 seq_printf(m, " seqno: 0x%08x\n", error->bcs_seqno); 641 seq_printf(m, " seqno: 0x%08x\n", error->bcs_seqno);
637 seq_printf(m, "Video (BSD) command stream:\n"); 642 seq_printf(m, "Video (BSD) command stream:\n");
638 seq_printf(m, " ACTHD: 0x%08x\n", error->vcs_acthd); 643 seq_printf(m, " ACTHD: 0x%08x\n", error->vcs_acthd);
639 seq_printf(m, " IPEHR: 0x%08x\n", error->vcs_ipehr);
640 seq_printf(m, " IPEIR: 0x%08x\n", error->vcs_ipeir); 644 seq_printf(m, " IPEIR: 0x%08x\n", error->vcs_ipeir);
645 seq_printf(m, " IPEHR: 0x%08x\n", error->vcs_ipehr);
641 seq_printf(m, " INSTDONE: 0x%08x\n", error->vcs_instdone); 646 seq_printf(m, " INSTDONE: 0x%08x\n", error->vcs_instdone);
642 seq_printf(m, " seqno: 0x%08x\n", error->vcs_seqno); 647 seq_printf(m, " seqno: 0x%08x\n", error->vcs_seqno);
643 } 648 }
@@ -657,7 +662,7 @@ static int i915_error_state(struct seq_file *m, void *unused)
657 seq_printf(m, "Buffers [%d]:\n", error->active_bo_count); 662 seq_printf(m, "Buffers [%d]:\n", error->active_bo_count);
658 663
659 for (i = 0; i < error->active_bo_count; i++) { 664 for (i = 0; i < error->active_bo_count; i++) {
660 seq_printf(m, " %08x %8zd %08x %08x %08x%s%s%s%s", 665 seq_printf(m, " %08x %8zd %08x %08x %08x%s%s%s%s %s",
661 error->active_bo[i].gtt_offset, 666 error->active_bo[i].gtt_offset,
662 error->active_bo[i].size, 667 error->active_bo[i].size,
663 error->active_bo[i].read_domains, 668 error->active_bo[i].read_domains,
@@ -666,7 +671,8 @@ static int i915_error_state(struct seq_file *m, void *unused)
666 pin_flag(error->active_bo[i].pinned), 671 pin_flag(error->active_bo[i].pinned),
667 tiling_flag(error->active_bo[i].tiling), 672 tiling_flag(error->active_bo[i].tiling),
668 dirty_flag(error->active_bo[i].dirty), 673 dirty_flag(error->active_bo[i].dirty),
669 purgeable_flag(error->active_bo[i].purgeable)); 674 purgeable_flag(error->active_bo[i].purgeable),
675 ring_str(error->active_bo[i].ring));
670 676
671 if (error->active_bo[i].name) 677 if (error->active_bo[i].name)
672 seq_printf(m, " (name: %d)", error->active_bo[i].name); 678 seq_printf(m, " (name: %d)", error->active_bo[i].name);
@@ -1101,15 +1107,15 @@ static struct drm_info_list i915_debugfs_list[] = {
1101 {"i915_gem_seqno", i915_gem_seqno_info, 0}, 1107 {"i915_gem_seqno", i915_gem_seqno_info, 0},
1102 {"i915_gem_fence_regs", i915_gem_fence_regs_info, 0}, 1108 {"i915_gem_fence_regs", i915_gem_fence_regs_info, 0},
1103 {"i915_gem_interrupt", i915_interrupt_info, 0}, 1109 {"i915_gem_interrupt", i915_interrupt_info, 0},
1104 {"i915_gem_hws", i915_hws_info, 0, (void *)RENDER_RING}, 1110 {"i915_gem_hws", i915_hws_info, 0, (void *)RING_RENDER},
1105 {"i915_gem_hws_blt", i915_hws_info, 0, (void *)BLT_RING}, 1111 {"i915_gem_hws_blt", i915_hws_info, 0, (void *)RING_BLT},
1106 {"i915_gem_hws_bsd", i915_hws_info, 0, (void *)BSD_RING}, 1112 {"i915_gem_hws_bsd", i915_hws_info, 0, (void *)RING_BSD},
1107 {"i915_ringbuffer_data", i915_ringbuffer_data, 0, (void *)RENDER_RING}, 1113 {"i915_ringbuffer_data", i915_ringbuffer_data, 0, (void *)RING_RENDER},
1108 {"i915_ringbuffer_info", i915_ringbuffer_info, 0, (void *)RENDER_RING}, 1114 {"i915_ringbuffer_info", i915_ringbuffer_info, 0, (void *)RING_RENDER},
1109 {"i915_bsd_ringbuffer_data", i915_ringbuffer_data, 0, (void *)BSD_RING}, 1115 {"i915_bsd_ringbuffer_data", i915_ringbuffer_data, 0, (void *)RING_BSD},
1110 {"i915_bsd_ringbuffer_info", i915_ringbuffer_info, 0, (void *)BSD_RING}, 1116 {"i915_bsd_ringbuffer_info", i915_ringbuffer_info, 0, (void *)RING_BSD},
1111 {"i915_blt_ringbuffer_data", i915_ringbuffer_data, 0, (void *)BLT_RING}, 1117 {"i915_blt_ringbuffer_data", i915_ringbuffer_data, 0, (void *)RING_BLT},
1112 {"i915_blt_ringbuffer_info", i915_ringbuffer_info, 0, (void *)BLT_RING}, 1118 {"i915_blt_ringbuffer_info", i915_ringbuffer_info, 0, (void *)RING_BLT},
1113 {"i915_batchbuffers", i915_batchbuffer_info, 0}, 1119 {"i915_batchbuffers", i915_batchbuffer_info, 0},
1114 {"i915_error_state", i915_error_state, 0}, 1120 {"i915_error_state", i915_error_state, 0},
1115 {"i915_rstdby_delays", i915_rstdby_delays, 0}, 1121 {"i915_rstdby_delays", i915_rstdby_delays, 0},