aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_debugfs.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-10-27 10:27:33 -0400
committerChris Wilson <chris@chris-wilson.co.uk>2010-10-27 18:30:59 -0400
commitb2223497b44a4701d1be873d1e9453d7f720043b (patch)
tree7e7e014512c25e410e67095e662dd0428dfb9c74 /drivers/gpu/drm/i915/i915_debugfs.c
parentc2c347a9eeda1b9b69c8fc393fd933747fbb2e11 (diff)
drm/i915: Remove the confusing global waiting/irq seqno
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.c44
1 files changed, 19 insertions, 25 deletions
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index c5aa6bee3abb..beb3de7921b5 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -319,6 +319,19 @@ static int i915_gem_request_info(struct seq_file *m, void *data)
319 return 0; 319 return 0;
320} 320}
321 321
322static void i915_ring_seqno_info(struct seq_file *m,
323 struct intel_ring_buffer *ring)
324{
325 if (ring->get_seqno) {
326 seq_printf(m, "Current sequence (%s): %d\n",
327 ring->name, ring->get_seqno(ring));
328 seq_printf(m, "Waiter sequence (%s): %d\n",
329 ring->name, ring->waiting_seqno);
330 seq_printf(m, "IRQ sequence (%s): %d\n",
331 ring->name, ring->irq_seqno);
332 }
333}
334
322static int i915_gem_seqno_info(struct seq_file *m, void *data) 335static int i915_gem_seqno_info(struct seq_file *m, void *data)
323{ 336{
324 struct drm_info_node *node = (struct drm_info_node *) m->private; 337 struct drm_info_node *node = (struct drm_info_node *) m->private;
@@ -330,15 +343,9 @@ static int i915_gem_seqno_info(struct seq_file *m, void *data)
330 if (ret) 343 if (ret)
331 return ret; 344 return ret;
332 345
333 if (dev_priv->render_ring.status_page.page_addr != NULL) { 346 i915_ring_seqno_info(m, &dev_priv->render_ring);
334 seq_printf(m, "Current sequence: %d\n", 347 i915_ring_seqno_info(m, &dev_priv->bsd_ring);
335 dev_priv->render_ring.get_seqno(&dev_priv->render_ring)); 348 i915_ring_seqno_info(m, &dev_priv->blt_ring);
336 } else {
337 seq_printf(m, "Current sequence: hws uninitialized\n");
338 }
339 seq_printf(m, "Waiter sequence: %d\n",
340 dev_priv->mm.waiting_gem_seqno);
341 seq_printf(m, "IRQ sequence: %d\n", dev_priv->mm.irq_gem_seqno);
342 349
343 mutex_unlock(&dev->struct_mutex); 350 mutex_unlock(&dev->struct_mutex);
344 351
@@ -390,22 +397,9 @@ static int i915_interrupt_info(struct seq_file *m, void *data)
390 } 397 }
391 seq_printf(m, "Interrupts received: %d\n", 398 seq_printf(m, "Interrupts received: %d\n",
392 atomic_read(&dev_priv->irq_received)); 399 atomic_read(&dev_priv->irq_received));
393 if (dev_priv->render_ring.get_seqno) { 400 i915_ring_seqno_info(m, &dev_priv->render_ring);
394 seq_printf(m, "Current sequence (render): %d\n", 401 i915_ring_seqno_info(m, &dev_priv->bsd_ring);
395 dev_priv->render_ring.get_seqno(&dev_priv->render_ring)); 402 i915_ring_seqno_info(m, &dev_priv->blt_ring);
396 }
397 if (dev_priv->bsd_ring.get_seqno) {
398 seq_printf(m, "Current sequence (BSD): %d\n",
399 dev_priv->bsd_ring.get_seqno(&dev_priv->bsd_ring));
400 }
401 if (dev_priv->blt_ring.get_seqno) {
402 seq_printf(m, "Current sequence (BLT): %d\n",
403 dev_priv->blt_ring.get_seqno(&dev_priv->blt_ring));
404 }
405 seq_printf(m, "Waiter sequence: %d\n",
406 dev_priv->mm.waiting_gem_seqno);
407 seq_printf(m, "IRQ sequence: %d\n",
408 dev_priv->mm.irq_gem_seqno);
409 mutex_unlock(&dev->struct_mutex); 403 mutex_unlock(&dev->struct_mutex);
410 404
411 return 0; 405 return 0;