diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/i915/i915_debugfs.c | 44 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.h | 10 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/i915_irq.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_ringbuffer.h | 4 |
5 files changed, 26 insertions, 42 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 | ||
322 | static 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 | |||
322 | static int i915_gem_seqno_info(struct seq_file *m, void *data) | 335 | static 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; |
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index c241468c632e..2af8e1604b44 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h | |||
@@ -609,16 +609,6 @@ typedef struct drm_i915_private { | |||
609 | struct delayed_work retire_work; | 609 | struct delayed_work retire_work; |
610 | 610 | ||
611 | /** | 611 | /** |
612 | * Waiting sequence number, if any | ||
613 | */ | ||
614 | uint32_t waiting_gem_seqno; | ||
615 | |||
616 | /** | ||
617 | * Last seq seen at irq time | ||
618 | */ | ||
619 | uint32_t irq_gem_seqno; | ||
620 | |||
621 | /** | ||
622 | * Flag if the X Server, and thus DRM, is not currently in | 612 | * Flag if the X Server, and thus DRM, is not currently in |
623 | * control of the device. | 613 | * control of the device. |
624 | * | 614 | * |
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 580244c1e793..74f5525d156f 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -1984,7 +1984,7 @@ i915_do_wait_request(struct drm_device *dev, uint32_t seqno, | |||
1984 | 1984 | ||
1985 | trace_i915_gem_request_wait_begin(dev, seqno); | 1985 | trace_i915_gem_request_wait_begin(dev, seqno); |
1986 | 1986 | ||
1987 | ring->waiting_gem_seqno = seqno; | 1987 | ring->waiting_seqno = seqno; |
1988 | ring->user_irq_get(ring); | 1988 | ring->user_irq_get(ring); |
1989 | if (interruptible) | 1989 | if (interruptible) |
1990 | ret = wait_event_interruptible(ring->irq_queue, | 1990 | ret = wait_event_interruptible(ring->irq_queue, |
@@ -1996,7 +1996,7 @@ i915_do_wait_request(struct drm_device *dev, uint32_t seqno, | |||
1996 | || atomic_read(&dev_priv->mm.wedged)); | 1996 | || atomic_read(&dev_priv->mm.wedged)); |
1997 | 1997 | ||
1998 | ring->user_irq_put(ring); | 1998 | ring->user_irq_put(ring); |
1999 | ring->waiting_gem_seqno = 0; | 1999 | ring->waiting_seqno = 0; |
2000 | 2000 | ||
2001 | trace_i915_gem_request_wait_end(dev, seqno); | 2001 | trace_i915_gem_request_wait_end(dev, seqno); |
2002 | } | 2002 | } |
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 23b28528c642..29cbcb33b92c 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c | |||
@@ -298,7 +298,7 @@ static void notify_ring(struct drm_device *dev, | |||
298 | { | 298 | { |
299 | struct drm_i915_private *dev_priv = dev->dev_private; | 299 | struct drm_i915_private *dev_priv = dev->dev_private; |
300 | u32 seqno = ring->get_seqno(ring); | 300 | u32 seqno = ring->get_seqno(ring); |
301 | ring->irq_gem_seqno = seqno; | 301 | ring->irq_seqno = seqno; |
302 | trace_i915_gem_request_complete(dev, seqno); | 302 | trace_i915_gem_request_complete(dev, seqno); |
303 | wake_up_all(&ring->irq_queue); | 303 | wake_up_all(&ring->irq_queue); |
304 | dev_priv->hangcheck_count = 0; | 304 | dev_priv->hangcheck_count = 0; |
@@ -1319,10 +1319,10 @@ static bool i915_hangcheck_ring_idle(struct intel_ring_buffer *ring, bool *err) | |||
1319 | if (list_empty(&ring->request_list) || | 1319 | if (list_empty(&ring->request_list) || |
1320 | i915_seqno_passed(ring->get_seqno(ring), ring_last_seqno(ring))) { | 1320 | i915_seqno_passed(ring->get_seqno(ring), ring_last_seqno(ring))) { |
1321 | /* Issue a wake-up to catch stuck h/w. */ | 1321 | /* Issue a wake-up to catch stuck h/w. */ |
1322 | if (ring->waiting_gem_seqno && waitqueue_active(&ring->irq_queue)) { | 1322 | if (ring->waiting_seqno && waitqueue_active(&ring->irq_queue)) { |
1323 | DRM_ERROR("Hangcheck timer elapsed... %s idle [waiting on %d, at %d], missed IRQ?\n", | 1323 | DRM_ERROR("Hangcheck timer elapsed... %s idle [waiting on %d, at %d], missed IRQ?\n", |
1324 | ring->name, | 1324 | ring->name, |
1325 | ring->waiting_gem_seqno, | 1325 | ring->waiting_seqno, |
1326 | ring->get_seqno(ring)); | 1326 | ring->get_seqno(ring)); |
1327 | wake_up_all(&ring->irq_queue); | 1327 | wake_up_all(&ring->irq_queue); |
1328 | *err = true; | 1328 | *err = true; |
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.h b/drivers/gpu/drm/i915/intel_ringbuffer.h index 84f6919de8e0..7ad9e94220b4 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.h +++ b/drivers/gpu/drm/i915/intel_ringbuffer.h | |||
@@ -35,8 +35,8 @@ struct intel_ring_buffer { | |||
35 | int size; | 35 | int size; |
36 | struct intel_hw_status_page status_page; | 36 | struct intel_hw_status_page status_page; |
37 | 37 | ||
38 | u32 irq_gem_seqno; /* last seq seem at irq time */ | 38 | u32 irq_seqno; /* last seq seem at irq time */ |
39 | u32 waiting_gem_seqno; | 39 | u32 waiting_seqno; |
40 | int user_irq_refcount; | 40 | int user_irq_refcount; |
41 | void (*user_irq_get)(struct intel_ring_buffer *ring); | 41 | void (*user_irq_get)(struct intel_ring_buffer *ring); |
42 | void (*user_irq_put)(struct intel_ring_buffer *ring); | 42 | void (*user_irq_put)(struct intel_ring_buffer *ring); |