diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-02-09 11:15:49 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-02-09 15:27:06 -0500 |
commit | 3cf17fc522ee081f7cb2ab325e6c697ca12005e4 (patch) | |
tree | 7ee6b99c2454ef3ec5aa38ff13d1d4dd8e2db4aa /drivers/gpu/drm/i915/i915_debugfs.c | |
parent | 5eb719cdbe4723729ff28d6aa1ebd3bf2392d7e3 (diff) |
drm/i915: ppgtt debugfs info
This was pretty usefull for debugging, might be useful for diagnosing
issues.
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
Tested-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Reviewed-by: Eugeni Dodonov <eugeni.dodonov@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_debugfs.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_debugfs.c | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index f3fe2f872d5a..5d24581452eb 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c | |||
@@ -1447,6 +1447,43 @@ static int i915_swizzle_info(struct seq_file *m, void *data) | |||
1447 | return 0; | 1447 | return 0; |
1448 | } | 1448 | } |
1449 | 1449 | ||
1450 | static int i915_ppgtt_info(struct seq_file *m, void *data) | ||
1451 | { | ||
1452 | struct drm_info_node *node = (struct drm_info_node *) m->private; | ||
1453 | struct drm_device *dev = node->minor->dev; | ||
1454 | struct drm_i915_private *dev_priv = dev->dev_private; | ||
1455 | struct intel_ring_buffer *ring; | ||
1456 | int i, ret; | ||
1457 | |||
1458 | |||
1459 | ret = mutex_lock_interruptible(&dev->struct_mutex); | ||
1460 | if (ret) | ||
1461 | return ret; | ||
1462 | if (INTEL_INFO(dev)->gen == 6) | ||
1463 | seq_printf(m, "GFX_MODE: 0x%08x\n", I915_READ(GFX_MODE)); | ||
1464 | |||
1465 | for (i = 0; i < I915_NUM_RINGS; i++) { | ||
1466 | ring = &dev_priv->ring[i]; | ||
1467 | |||
1468 | seq_printf(m, "%s\n", ring->name); | ||
1469 | if (INTEL_INFO(dev)->gen == 7) | ||
1470 | seq_printf(m, "GFX_MODE: 0x%08x\n", I915_READ(RING_MODE_GEN7(ring))); | ||
1471 | seq_printf(m, "PP_DIR_BASE: 0x%08x\n", I915_READ(RING_PP_DIR_BASE(ring))); | ||
1472 | seq_printf(m, "PP_DIR_BASE_READ: 0x%08x\n", I915_READ(RING_PP_DIR_BASE_READ(ring))); | ||
1473 | seq_printf(m, "PP_DIR_DCLV: 0x%08x\n", I915_READ(RING_PP_DIR_DCLV(ring))); | ||
1474 | } | ||
1475 | if (dev_priv->mm.aliasing_ppgtt) { | ||
1476 | struct i915_hw_ppgtt *ppgtt = dev_priv->mm.aliasing_ppgtt; | ||
1477 | |||
1478 | seq_printf(m, "aliasing PPGTT:\n"); | ||
1479 | seq_printf(m, "pd gtt offset: 0x%08x\n", ppgtt->pd_offset); | ||
1480 | } | ||
1481 | seq_printf(m, "ECOCHK: 0x%08x\n", I915_READ(GAM_ECOCHK)); | ||
1482 | mutex_unlock(&dev->struct_mutex); | ||
1483 | |||
1484 | return 0; | ||
1485 | } | ||
1486 | |||
1450 | static int | 1487 | static int |
1451 | i915_debugfs_common_open(struct inode *inode, | 1488 | i915_debugfs_common_open(struct inode *inode, |
1452 | struct file *filp) | 1489 | struct file *filp) |
@@ -1788,6 +1825,7 @@ static struct drm_info_list i915_debugfs_list[] = { | |||
1788 | {"i915_context_status", i915_context_status, 0}, | 1825 | {"i915_context_status", i915_context_status, 0}, |
1789 | {"i915_gen6_forcewake_count", i915_gen6_forcewake_count_info, 0}, | 1826 | {"i915_gen6_forcewake_count", i915_gen6_forcewake_count_info, 0}, |
1790 | {"i915_swizzle_info", i915_swizzle_info, 0}, | 1827 | {"i915_swizzle_info", i915_swizzle_info, 0}, |
1828 | {"i915_ppgtt_info", i915_ppgtt_info, 0}, | ||
1791 | }; | 1829 | }; |
1792 | #define I915_DEBUGFS_ENTRIES ARRAY_SIZE(i915_debugfs_list) | 1830 | #define I915_DEBUGFS_ENTRIES ARRAY_SIZE(i915_debugfs_list) |
1793 | 1831 | ||