Lines Matching defs:ring
353 gen3_instdone_bit(I830_SECONDARY_RING_3_DONE, "Secondary ring 3");
354 gen3_instdone_bit(I830_SECONDARY_RING_2_DONE, "Secondary ring 2");
355 gen3_instdone_bit(I830_SECONDARY_RING_1_DONE, "Secondary ring 1");
356 gen3_instdone_bit(I830_SECONDARY_RING_0_DONE, "Secondary ring 0");
357 gen3_instdone_bit(I830_PRIMARY_RING_1_DONE, "Primary ring 1");
358 gen3_instdone_bit(I830_PRIMARY_RING_0_DONE, "Primary ring 0");
361 #define ring_read(ring, reg) I915_READ(ring->mmio + reg)
376 struct ring {
616 static void ring_init(struct drm_device *dev, struct ring *ring)
620 ring->size = (((ring_read(ring, _RING_LEN) & RING_NR_PAGES) >> 12) + 1) * 4096;
624 static void ring_reset(struct ring *ring)
626 ring->idle = ring->full = 0;
629 static void ring_sample(struct drm_device *dev, struct ring *ring)
634 if (!ring->size)
638 ring->head = ring_read(ring, _RING_HEAD) & HEAD_ADDR;
639 ring->tail = ring_read(ring, _RING_TAIL) & TAIL_ADDR;
642 if (ring->tail == ring->head)
643 ring->idle++;
645 full = ring->tail - ring->head;
647 full += ring->size;
648 ring->full += full;
651 static void ring_print(struct ring *ring, unsigned long samples_per_sec)
656 samples_to_percent_ratio = (ring->idle * 100) / samples_per_sec;
659 if (!ring->size)
662 DRM_ERROR("%25s busy: %3d%%: ", ring->name, percent);
664 ring->name,
665 (int)(ring->full / samples_per_sec),
666 ring->size,
667 (int)((ring->full / samples_to_percent_ratio) / ring->size));
673 struct ring render_ring = {
870 void ring_dump(struct drm_device *dev, struct intel_ring_buffer *ring)
874 if (ring) {
875 /* dump ring infor*/
878 head = I915_READ_HEAD(ring) & HEAD_ADDR;
879 tail = I915_READ_TAIL(ring) & TAIL_ADDR;
881 DRM_ERROR("Dump %s ring", ring->name);
883 DRM_ERROR("seq %d", ring->get_seqno(ring, true));
889 virt = (unsigned int *)((intptr_t)ring->virtual_start + head + (i-180)*4);
890 DRM_ERROR("%s[0x%x]: 0x%x", ring->name, head + (i-180)*4, virt[0]);