Lines Matching defs:ring

650 			struct intel_ring_buffer *ring)
654 if (ring->obj == NULL)
657 DRM_WAKEUP(&ring->irq_queue);
783 notify_ring(dev, &dev_priv->ring[RCS]);
785 notify_ring(dev, &dev_priv->ring[VCS]);
787 notify_ring(dev, &dev_priv->ring[BCS]);
906 notify_ring(dev_priv->dev, &dev_priv->ring[VECS]);
1250 notify_ring(dev, &dev_priv->ring[RCS]);
1252 notify_ring(dev, &dev_priv->ring[VCS]);
1369 struct intel_ring_buffer *ring;
1409 for_each_ring(ring, dev_priv, i)
1410 ring_dump(dev, ring);
1418 for_each_ring(ring, dev_priv, i)
1419 wake_up_all(&ring->irq_queue);
1559 for (i = 0; i < ARRAY_SIZE(error->ring); i++) {
1560 i915_error_object_free(error->ring[i].batchbuffer);
1561 i915_error_object_free(error->ring[i].ringbuffer);
1562 i915_error_object_free(error->ring[i].ctx);
1563 kfree(error->ring[i].requests);
1590 err->ring = obj->ring ? obj->ring->id : -1;
1661 struct intel_ring_buffer *ring)
1666 if (!ring->get_seqno)
1672 if (WARN_ON(ring->id != RCS))
1675 obj = ring->private;
1681 seqno = ring->get_seqno(ring, false);
1683 if (obj->ring != ring)
1703 struct intel_ring_buffer *ring)
1708 error->rc_psmi[ring->id] = I915_READ(ring->mmio_base + 0x50);
1709 error->fault_reg[ring->id] = I915_READ(RING_FAULT_REG(ring));
1710 error->semaphore_mboxes[ring->id][0]
1711 = I915_READ(RING_SYNC_0(ring->mmio_base));
1712 error->semaphore_mboxes[ring->id][1]
1713 = I915_READ(RING_SYNC_1(ring->mmio_base));
1714 error->semaphore_seqno[ring->id][0] = ring->sync_seqno[0];
1715 error->semaphore_seqno[ring->id][1] = ring->sync_seqno[1];
1719 error->faddr[ring->id] = I915_READ(RING_DMA_FADD(ring->mmio_base));
1720 error->ipeir[ring->id] = I915_READ(RING_IPEIR(ring->mmio_base));
1721 error->ipehr[ring->id] = I915_READ(RING_IPEHR(ring->mmio_base));
1722 error->instdone[ring->id] = I915_READ(RING_INSTDONE(ring->mmio_base));
1723 error->instps[ring->id] = I915_READ(RING_INSTPS(ring->mmio_base));
1724 if (ring->id == RCS)
1727 error->faddr[ring->id] = I915_READ(DMA_FADD_I8XX);
1728 error->ipeir[ring->id] = I915_READ(IPEIR);
1729 error->ipehr[ring->id] = I915_READ(IPEHR);
1730 error->instdone[ring->id] = I915_READ(INSTDONE);
1733 error->waiting[ring->id] = waitqueue_active(&ring->irq_queue);
1734 error->instpm[ring->id] = I915_READ(RING_INSTPM(ring->mmio_base));
1735 error->seqno[ring->id] = ring->get_seqno(ring, false);
1736 error->acthd[ring->id] = intel_ring_get_active_head(ring);
1737 error->head[ring->id] = I915_READ_HEAD(ring);
1738 error->tail[ring->id] = I915_READ_TAIL(ring);
1739 error->ctl[ring->id] = I915_READ_CTL(ring);
1741 error->cpu_ring_head[ring->id] = ring->head;
1742 error->cpu_ring_tail[ring->id] = ring->tail;
1746 static void i915_gem_record_active_context(struct intel_ring_buffer *ring,
1750 struct drm_i915_private *dev_priv = ring->dev->dev_private;
1753 /* Currently render ring is the only HW context user */
1754 if (ring->id != RCS || !error->ccid)
1769 struct intel_ring_buffer *ring;
1773 for_each_ring(ring, dev_priv, i) {
1774 i915_record_ring_state(dev, error, ring);
1776 error->ring[i].batchbuffer =
1777 i915_error_first_batchbuffer(dev_priv, ring);
1779 error->ring[i].ringbuffer =
1780 i915_error_object_create(dev_priv, ring->obj);
1783 i915_gem_record_active_context(ring, error, &error->ring[i]);
1786 list_for_each_entry(request, &ring->request_list, list)
1789 error->ring[i].num_requests = count;
1790 error->ring[i].requests =
1793 if (error->ring[i].requests == NULL) {
1794 error->ring[i].num_requests = 0;
1799 list_for_each_entry(request, &ring->request_list, list) {
1802 erq = &error->ring[i].requests[count++];
2075 * of a ring dump etc.).
2080 struct intel_ring_buffer *ring;
2093 for_each_ring(ring, dev_priv, i)
2094 wake_up_all(&ring->irq_queue);
2287 ring_last_seqno(struct intel_ring_buffer *ring)
2290 last_req = list_entry(ring->request_list.prev,
2296 ring_idle(struct intel_ring_buffer *ring, u32 seqno)
2298 return (list_empty(&ring->request_list) ||
2299 i915_seqno_passed(seqno, ring_last_seqno(ring)));
2303 semaphore_waits_for(struct intel_ring_buffer *ring, u32 *seqno)
2305 struct drm_i915_private *dev_priv = ring->dev->dev_private;
2309 ipehr = I915_READ(RING_IPEHR(ring->mmio_base));
2317 acthd = intel_ring_get_active_head(ring) & HEAD_ADDR;
2320 tmp = (u32 *)((intptr_t)ring->virtual_start + acthd);
2330 tmp = (u32 *)((intptr_t)ring->virtual_start + acthd + 4 );
2332 return &dev_priv->ring[(ring->id + (((ipehr >> 17) & 1) + 1)) % 3];
2335 static int semaphore_passed(struct intel_ring_buffer *ring)
2337 struct drm_i915_private *dev_priv = ring->dev->dev_private;
2341 ring->hangcheck.deadlock = true;
2343 signaller = semaphore_waits_for(ring, &seqno);
2357 struct intel_ring_buffer *ring;
2360 for_each_ring(ring, dev_priv, i)
2361 ring->hangcheck.deadlock = false;
2365 ring_stuck(struct intel_ring_buffer *ring, u32 acthd)
2367 struct drm_device *dev = ring->dev;
2371 if (ring->hangcheck.acthd != acthd)
2382 tmp = I915_READ_CTL(ring);
2385 ring->name);
2386 I915_WRITE_CTL(ring, tmp);
2391 switch (semaphore_passed(ring)) {
2396 ring->name);
2397 I915_WRITE_CTL(ring, tmp);
2411 * Further, acthd is inspected to see if the ring is stuck. On stuck case
2412 * we kick the ring. If we see no progress on three subsequent calls
2419 struct intel_ring_buffer *ring;
2431 for_each_ring(ring, dev_priv, i) {
2437 seqno = ring->get_seqno(ring, false);
2438 acthd = intel_ring_get_active_head(ring);
2440 if (ring->hangcheck.seqno == seqno) {
2441 if (ring_idle(ring, seqno)) {
2442 if (mutex_is_locked(&ring->irq_queue.lock)) {
2445 ring->name);
2446 wake_up_all(&ring->irq_queue);
2447 ring->hangcheck.score += HUNG;
2454 * if the ring is busy and still processing
2458 * the hangcheck score on this ring, if this
2459 * ring is in a legitimate wait for another
2460 * ring. In that case the waiting ring is a
2463 * the ring, add a small increment to the
2468 ring->hangcheck.action = ring_stuck(ring,
2471 switch (ring->hangcheck.action) {
2486 ring->hangcheck.score += score;
2492 if (ring->hangcheck.score > 0)
2493 ring->hangcheck.score--;
2496 ring->hangcheck.seqno = seqno;
2497 ring->hangcheck.acthd = acthd;
2501 for_each_ring(ring, dev_priv, i) {
2502 if (ring->hangcheck.score > FIRE) {
2505 ring->name);
3029 notify_ring(dev, &dev_priv->ring[RCS]);
3217 notify_ring(dev, &dev_priv->ring[RCS]);
3456 notify_ring(dev, &dev_priv->ring[RCS]);
3458 notify_ring(dev, &dev_priv->ring[VCS]);