Lines Matching defs:offset

620  * @offset: (inout): the current position for writing into @buf
626 * The @buf @offset will only be updated on success.
633 size_t *offset,
638 if ((count - *offset) < header.size)
641 if (copy_to_user(buf + *offset, &header, sizeof(header)))
644 (*offset) += header.size;
654 * @offset: (inout): the current position for writing into @buf
662 * The @buf @offset will only be updated on success.
669 size_t *offset,
681 if ((count - *offset) < header.size)
684 buf += *offset;
704 (*offset) += header.size;
715 * @offset: (inout): the current position for writing into @buf
733 size_t *offset)
740 size_t start_offset = *offset;
883 ret = append_oa_sample(stream, buf, count, offset,
913 if (start_offset != *offset) {
942 * @offset: (inout): the current position for writing into @buf
948 * Updates @offset according to the number of bytes successfully copied into
953 * updated @offset.
960 size_t *offset)
991 ret = append_oa_status(stream, buf, count, offset,
1011 ret = append_oa_status(stream, buf, count, offset,
1024 return gen8_append_oa_reports(stream, buf, count, offset);
1033 * @offset: (inout): the current position for writing into @buf
1051 size_t *offset)
1058 size_t start_offset = *offset;
1110 "Spurious OA head ptr: non-integral report offset\n");
1127 ret = append_oa_sample(stream, buf, count, offset, report);
1138 if (start_offset != *offset) {
1162 * @offset: (inout): the current position for writing into @buf
1168 * Updates @offset according to the number of bytes successfully copied into
1176 size_t *offset)
1215 ret = append_oa_status(stream, buf, count, offset,
1231 ret = append_oa_status(stream, buf, count, offset,
1239 return gen7_append_oa_reports(stream, buf, count, offset);
1288 * @offset: (inout): the current position for writing into @buf
1290 * Updates @offset according to the number of bytes successfully copied into
1298 size_t *offset)
1300 return stream->perf->ops.read(stream, buf, count, offset);
1326 * As the ID is the gtt offset of the context's vma we
1466 static bool oa_find_reg_in_lri(u32 *state, u32 reg, u32 *offset, u32 end)
1468 u32 idx = *offset;
1480 *offset = idx;
1486 u32 offset, len = (ce->engine->context_size - PAGE_SIZE) / 4;
1492 for (offset = 0; offset < len; ) {
1493 if (IS_MI_LRI_CMD(state[offset])) {
1499 MI_LRI_LEN(state[offset]) & 0x1);
1501 if (oa_find_reg_in_lri(state, reg, &offset, len))
1504 offset++;
1508 return offset < len ? offset : U32_MAX;
1515 u32 offset = perf->ctx_oactxctrl_offset;
1517 /* Do this only once. Failure is stored as offset of U32_MAX */
1518 if (offset)
1521 offset = oa_context_image_offset(ce, i915_mmio_reg_offset(reg));
1522 perf->ctx_oactxctrl_offset = offset;
1525 "%s oa ctx control at 0x%08x dword offset\n",
1526 ce->engine->name, offset);
1529 return offset && offset != U32_MAX ? 0 : -ENODEV;
1560 * offset here, just return an error.
1944 bool save, i915_reg_t reg, u32 offset,
1958 *cs++ = i915_ggtt_offset(stream->noa_wait) + offset + 4 * d;
2507 u32 offset;
2516 u32 offset;
2523 offset = i915_ggtt_offset(ce->state) + LRC_STATE_OFFSET;
2526 *cs++ = offset + flex->offset * sizeof(u32);
2645 u32 offset = stream->perf->ctx_oactxctrl_offset;
2649 offset + 1,
3524 size_t offset = 0;
3548 ret = stream->ops->read(stream, buf, count, &offset);
3550 } while (!offset && !ret);
3553 ret = stream->ops->read(stream, buf, count, &offset);
3572 return offset ?: (ret ?: -EAGAIN);
5130 * Calculate offset at runtime in oa_pin_context for gen12 and