Lines Matching refs:oa_buffer

460 	((__s)->oa_buffer.format->header == HDR_64_BIT)
534 * also updates the tail in the oa_buffer object.
544 u32 gtt_offset = i915_ggtt_offset(stream->oa_buffer.vma);
545 int report_size = stream->oa_buffer.format->size;
555 spin_lock_irqsave(&stream->oa_buffer.ptr_lock, flags);
564 partial_report_size = OA_TAKEN(hw_tail, stream->oa_buffer.tail);
583 while (OA_TAKEN(tail, stream->oa_buffer.tail) >= report_size) {
584 void *report = stream->oa_buffer.vaddr + tail;
597 stream->oa_buffer.head, tail, hw_tail);
599 stream->oa_buffer.tail = tail;
601 pollin = OA_TAKEN(stream->oa_buffer.tail,
602 stream->oa_buffer.head) >= report_size;
604 spin_unlock_irqrestore(&stream->oa_buffer.ptr_lock, flags);
666 int report_size = stream->oa_buffer.format->size;
683 oa_buf_end = stream->oa_buffer.vaddr + OA_BUFFER_SIZE;
691 if (copy_to_user(buf, stream->oa_buffer.vaddr,
730 int report_size = stream->oa_buffer.format->size;
731 u8 *oa_buf_base = stream->oa_buffer.vaddr;
732 u32 gtt_offset = i915_ggtt_offset(stream->oa_buffer.vma);
742 spin_lock_irqsave(&stream->oa_buffer.ptr_lock, flags);
744 head = stream->oa_buffer.head;
745 tail = stream->oa_buffer.tail;
747 spin_unlock_irqrestore(&stream->oa_buffer.ptr_lock, flags);
858 stream->oa_buffer.last_ctx_id == stream->specific_ctx_id ||
875 stream->oa_buffer.last_ctx_id = ctx_id;
886 u8 *oa_buf_end = stream->oa_buffer.vaddr +
907 spin_lock_irqsave(&stream->oa_buffer.ptr_lock, flags);
915 stream->oa_buffer.head = head;
917 spin_unlock_irqrestore(&stream->oa_buffer.ptr_lock, flags);
953 if (drm_WARN_ON(&uncore->i915->drm, !stream->oa_buffer.vaddr))
1040 int report_size = stream->oa_buffer.format->size;
1041 u8 *oa_buf_base = stream->oa_buffer.vaddr;
1042 u32 gtt_offset = i915_ggtt_offset(stream->oa_buffer.vma);
1052 spin_lock_irqsave(&stream->oa_buffer.ptr_lock, flags);
1054 head = stream->oa_buffer.head;
1055 tail = stream->oa_buffer.tail;
1057 spin_unlock_irqrestore(&stream->oa_buffer.ptr_lock, flags);
1119 spin_lock_irqsave(&stream->oa_buffer.ptr_lock, flags);
1124 stream->oa_buffer.head = head;
1126 spin_unlock_irqrestore(&stream->oa_buffer.ptr_lock, flags);
1157 if (drm_WARN_ON(&uncore->i915->drm, !stream->oa_buffer.vaddr))
1629 i915_vma_unpin_and_release(&stream->oa_buffer.vma,
1632 stream->oa_buffer.vaddr = NULL;
1699 u32 gtt_offset = i915_ggtt_offset(stream->oa_buffer.vma);
1702 spin_lock_irqsave(&stream->oa_buffer.ptr_lock, flags);
1709 stream->oa_buffer.head = 0;
1717 stream->oa_buffer.tail = 0;
1719 spin_unlock_irqrestore(&stream->oa_buffer.ptr_lock, flags);
1738 memset(stream->oa_buffer.vaddr, 0, OA_BUFFER_SIZE);
1744 u32 gtt_offset = i915_ggtt_offset(stream->oa_buffer.vma);
1747 spin_lock_irqsave(&stream->oa_buffer.ptr_lock, flags);
1751 stream->oa_buffer.head = 0;
1768 stream->oa_buffer.tail = 0;
1775 stream->oa_buffer.last_ctx_id = INVALID_CTX_ID;
1777 spin_unlock_irqrestore(&stream->oa_buffer.ptr_lock, flags);
1791 memset(stream->oa_buffer.vaddr, 0, OA_BUFFER_SIZE);
1797 u32 gtt_offset = i915_ggtt_offset(stream->oa_buffer.vma);
1800 spin_lock_irqsave(&stream->oa_buffer.ptr_lock, flags);
1805 stream->oa_buffer.head = 0;
1815 intel_uncore_write(uncore, __oa_regs(stream)->oa_buffer, gtt_offset |
1821 stream->oa_buffer.tail = 0;
1828 stream->oa_buffer.last_ctx_id = INVALID_CTX_ID;
1830 spin_unlock_irqrestore(&stream->oa_buffer.ptr_lock, flags);
1844 memset(stream->oa_buffer.vaddr, 0,
1845 stream->oa_buffer.vma->size);
1856 if (drm_WARN_ON(&i915->drm, stream->oa_buffer.vma))
1887 stream->oa_buffer.vma = vma;
1889 stream->oa_buffer.vaddr =
1891 if (IS_ERR(stream->oa_buffer.vaddr)) {
1892 ret = PTR_ERR(stream->oa_buffer.vaddr);
1904 stream->oa_buffer.vaddr = NULL;
1905 stream->oa_buffer.vma = NULL;
2611 u32 format = stream->oa_buffer.format->format;
2974 u32 report_format = stream->oa_buffer.format->format;
3000 u32 report_format = stream->oa_buffer.format->format;
3038 val = (stream->oa_buffer.format->format << regs->oa_ctrl_counter_format_shift) |
3290 stream->oa_buffer.format = &perf->oa_formats[props->oa_format];
3291 if (drm_WARN_ON(&i915->drm, stream->oa_buffer.format->size == 0))
3295 stream->sample_size += stream->oa_buffer.format->size;
3366 spin_lock_init(&stream->oa_buffer.ptr_lock);