diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-01-09 16:07:49 -0500 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-01-11 17:16:56 -0500 |
commit | a779e5abda0367aa9d53c0931d9687743afe503d (patch) | |
tree | 3cbccb434e44d5c1c4cbacebd4e611872f4b1503 /drivers/gpu | |
parent | 0a58705b2fc3fa29525cf2fdae3d4276a5771280 (diff) |
drm/i915: Record AGP memory type upon error
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/i915/i915_debugfs.c | 14 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.h | 5 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_irq.c | 1 |
3 files changed, 16 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index a7c194a837a..73914d84185 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c | |||
@@ -624,6 +624,15 @@ static const char *ring_str(int ring) | |||
624 | } | 624 | } |
625 | } | 625 | } |
626 | 626 | ||
627 | static const char *agp_type_str(int type) | ||
628 | { | ||
629 | switch (type) { | ||
630 | case 0: return " uncached"; | ||
631 | case 1: return " snooped"; | ||
632 | default: return ""; | ||
633 | } | ||
634 | } | ||
635 | |||
627 | static const char *pin_flag(int pinned) | 636 | static const char *pin_flag(int pinned) |
628 | { | 637 | { |
629 | if (pinned > 0) | 638 | if (pinned > 0) |
@@ -662,7 +671,7 @@ static void print_error_buffers(struct seq_file *m, | |||
662 | seq_printf(m, "%s [%d]:\n", name, count); | 671 | seq_printf(m, "%s [%d]:\n", name, count); |
663 | 672 | ||
664 | while (count--) { | 673 | while (count--) { |
665 | seq_printf(m, " %08x %8zd %04x %04x %08x%s%s%s%s%s", | 674 | seq_printf(m, " %08x %8zd %04x %04x %08x%s%s%s%s%s%s", |
666 | err->gtt_offset, | 675 | err->gtt_offset, |
667 | err->size, | 676 | err->size, |
668 | err->read_domains, | 677 | err->read_domains, |
@@ -672,7 +681,8 @@ static void print_error_buffers(struct seq_file *m, | |||
672 | tiling_flag(err->tiling), | 681 | tiling_flag(err->tiling), |
673 | dirty_flag(err->dirty), | 682 | dirty_flag(err->dirty), |
674 | purgeable_flag(err->purgeable), | 683 | purgeable_flag(err->purgeable), |
675 | ring_str(err->ring)); | 684 | ring_str(err->ring), |
685 | agp_type_str(err->agp_type)); | ||
676 | 686 | ||
677 | if (err->name) | 687 | if (err->name) |
678 | seq_printf(m, " (name: %d)", err->name); | 688 | seq_printf(m, " (name: %d)", err->name); |
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 6c9a042737d..6130f77c26b 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h | |||
@@ -174,18 +174,19 @@ struct drm_i915_error_state { | |||
174 | u32 *pages[0]; | 174 | u32 *pages[0]; |
175 | } *ringbuffer, *batchbuffer[I915_NUM_RINGS]; | 175 | } *ringbuffer, *batchbuffer[I915_NUM_RINGS]; |
176 | struct drm_i915_error_buffer { | 176 | struct drm_i915_error_buffer { |
177 | size_t size; | 177 | u32 size; |
178 | u32 name; | 178 | u32 name; |
179 | u32 seqno; | 179 | u32 seqno; |
180 | u32 gtt_offset; | 180 | u32 gtt_offset; |
181 | u32 read_domains; | 181 | u32 read_domains; |
182 | u32 write_domain; | 182 | u32 write_domain; |
183 | u32 fence_reg; | 183 | s32 fence_reg:5; |
184 | s32 pinned:2; | 184 | s32 pinned:2; |
185 | u32 tiling:2; | 185 | u32 tiling:2; |
186 | u32 dirty:1; | 186 | u32 dirty:1; |
187 | u32 purgeable:1; | 187 | u32 purgeable:1; |
188 | u32 ring:4; | 188 | u32 ring:4; |
189 | u32 agp_type:1; | ||
189 | } *active_bo, *pinned_bo; | 190 | } *active_bo, *pinned_bo; |
190 | u32 active_bo_count, pinned_bo_count; | 191 | u32 active_bo_count, pinned_bo_count; |
191 | struct intel_overlay_error_state *overlay; | 192 | struct intel_overlay_error_state *overlay; |
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index cf61235b858..e418e8bb61e 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c | |||
@@ -665,6 +665,7 @@ static u32 capture_bo_list(struct drm_i915_error_buffer *err, | |||
665 | err->dirty = obj->dirty; | 665 | err->dirty = obj->dirty; |
666 | err->purgeable = obj->madv != I915_MADV_WILLNEED; | 666 | err->purgeable = obj->madv != I915_MADV_WILLNEED; |
667 | err->ring = obj->ring ? obj->ring->id : 0; | 667 | err->ring = obj->ring ? obj->ring->id : 0; |
668 | err->agp_type = obj->agp_type == AGP_USER_CACHED_MEMORY; | ||
668 | 669 | ||
669 | if (++i == count) | 670 | if (++i == count) |
670 | break; | 671 | break; |