return 0;
}
+static void i915_ring_seqno_info(struct seq_file *m,
+ struct intel_ring_buffer *ring)
+{
+ if (ring->get_seqno) {
+ seq_printf(m, "Current sequence (%s): %d\n",
+ ring->name, ring->get_seqno(ring));
+ seq_printf(m, "Waiter sequence (%s): %d\n",
+ ring->name, ring->waiting_seqno);
+ seq_printf(m, "IRQ sequence (%s): %d\n",
+ ring->name, ring->irq_seqno);
+ }
+}
+
static int i915_gem_seqno_info(struct seq_file *m, void *data)
{
struct drm_info_node *node = (struct drm_info_node *) m->private;
if (ret)
return ret;
- if (dev_priv->render_ring.status_page.page_addr != NULL) {
- seq_printf(m, "Current sequence: %d\n",
- dev_priv->render_ring.get_seqno(&dev_priv->render_ring));
- } else {
- seq_printf(m, "Current sequence: hws uninitialized\n");
- }
- seq_printf(m, "Waiter sequence: %d\n",
- dev_priv->mm.waiting_gem_seqno);
- seq_printf(m, "IRQ sequence: %d\n", dev_priv->mm.irq_gem_seqno);
+ i915_ring_seqno_info(m, &dev_priv->render_ring);
+ i915_ring_seqno_info(m, &dev_priv->bsd_ring);
+ i915_ring_seqno_info(m, &dev_priv->blt_ring);
mutex_unlock(&dev->struct_mutex);
}
seq_printf(m, "Interrupts received: %d\n",
atomic_read(&dev_priv->irq_received));
- if (dev_priv->render_ring.get_seqno) {
- seq_printf(m, "Current sequence (render): %d\n",
- dev_priv->render_ring.get_seqno(&dev_priv->render_ring));
- }
- if (dev_priv->bsd_ring.get_seqno) {
- seq_printf(m, "Current sequence (BSD): %d\n",
- dev_priv->bsd_ring.get_seqno(&dev_priv->bsd_ring));
- }
- if (dev_priv->blt_ring.get_seqno) {
- seq_printf(m, "Current sequence (BLT): %d\n",
- dev_priv->blt_ring.get_seqno(&dev_priv->blt_ring));
- }
- seq_printf(m, "Waiter sequence: %d\n",
- dev_priv->mm.waiting_gem_seqno);
- seq_printf(m, "IRQ sequence: %d\n",
- dev_priv->mm.irq_gem_seqno);
+ i915_ring_seqno_info(m, &dev_priv->render_ring);
+ i915_ring_seqno_info(m, &dev_priv->bsd_ring);
+ i915_ring_seqno_info(m, &dev_priv->blt_ring);
mutex_unlock(&dev->struct_mutex);
return 0;
trace_i915_gem_request_wait_begin(dev, seqno);
- ring->waiting_gem_seqno = seqno;
+ ring->waiting_seqno = seqno;
ring->user_irq_get(ring);
if (interruptible)
ret = wait_event_interruptible(ring->irq_queue,
|| atomic_read(&dev_priv->mm.wedged));
ring->user_irq_put(ring);
- ring->waiting_gem_seqno = 0;
+ ring->waiting_seqno = 0;
trace_i915_gem_request_wait_end(dev, seqno);
}
{
struct drm_i915_private *dev_priv = dev->dev_private;
u32 seqno = ring->get_seqno(ring);
- ring->irq_gem_seqno = seqno;
+ ring->irq_seqno = seqno;
trace_i915_gem_request_complete(dev, seqno);
wake_up_all(&ring->irq_queue);
dev_priv->hangcheck_count = 0;
if (list_empty(&ring->request_list) ||
i915_seqno_passed(ring->get_seqno(ring), ring_last_seqno(ring))) {
/* Issue a wake-up to catch stuck h/w. */
- if (ring->waiting_gem_seqno && waitqueue_active(&ring->irq_queue)) {
+ if (ring->waiting_seqno && waitqueue_active(&ring->irq_queue)) {
DRM_ERROR("Hangcheck timer elapsed... %s idle [waiting on %d, at %d], missed IRQ?\n",
ring->name,
- ring->waiting_gem_seqno,
+ ring->waiting_seqno,
ring->get_seqno(ring));
wake_up_all(&ring->irq_queue);
*err = true;