Lines Matching refs:ringbuf
362 struct drm_i915_gem_object *rb_obj = rq->ringbuf->obj; in execlists_update_context()
451 struct intel_ringbuffer *ringbuf; in execlists_context_unqueue() local
453 ringbuf = req0->ctx->engine[ring->id].ringbuf; in execlists_context_unqueue()
455 req0->tail &= ringbuf->size - 1; in execlists_context_unqueue()
660 request->ringbuf = request->ctx->engine[request->ring->id].ringbuf; in intel_logical_ring_alloc_request_extras()
674 struct intel_ringbuffer *ringbuf = req->ringbuf; in logical_ring_wait_for_space() local
680 if (intel_ring_space(ringbuf) >= bytes) in logical_ring_wait_for_space()
684 WARN_ON(ringbuf->reserved_in_use); in logical_ring_wait_for_space()
692 if (target->ringbuf != ringbuf) in logical_ring_wait_for_space()
696 space = __intel_ring_space(target->postfix, ringbuf->tail, in logical_ring_wait_for_space()
697 ringbuf->size); in logical_ring_wait_for_space()
709 ringbuf->space = space; in logical_ring_wait_for_space()
728 intel_logical_ring_advance(request->ringbuf); in intel_logical_ring_advance_and_submit()
730 request->tail = request->ringbuf->tail; in intel_logical_ring_advance_and_submit()
741 static void __wrap_ring_buffer(struct intel_ringbuffer *ringbuf) in __wrap_ring_buffer() argument
744 int rem = ringbuf->size - ringbuf->tail; in __wrap_ring_buffer()
746 virt = ringbuf->virtual_start + ringbuf->tail; in __wrap_ring_buffer()
751 ringbuf->tail = 0; in __wrap_ring_buffer()
752 intel_ring_update_space(ringbuf); in __wrap_ring_buffer()
757 struct intel_ringbuffer *ringbuf = req->ringbuf; in logical_ring_prepare() local
758 int remain_usable = ringbuf->effective_size - ringbuf->tail; in logical_ring_prepare()
759 int remain_actual = ringbuf->size - ringbuf->tail; in logical_ring_prepare()
763 if (ringbuf->reserved_in_use) in logical_ring_prepare()
766 total_bytes = bytes + ringbuf->reserved_size; in logical_ring_prepare()
783 wait_bytes = remain_actual + ringbuf->reserved_size; in logical_ring_prepare()
784 } else if (total_bytes > ringbuf->space) { in logical_ring_prepare()
796 __wrap_ring_buffer(ringbuf); in logical_ring_prepare()
832 req->ringbuf->space -= num_dwords * sizeof(uint32_t); in intel_logical_ring_begin()
846 intel_ring_reserved_space_reserve(request->ringbuf, MIN_SPACE_FOR_ADD_REQUEST); in intel_logical_ring_reserve_space()
875 struct intel_ringbuffer *ringbuf = params->ctx->engine[ring->id].ringbuf; in intel_execlists_submission() local
922 intel_logical_ring_emit(ringbuf, MI_NOOP); in intel_execlists_submission()
923 intel_logical_ring_emit(ringbuf, MI_LOAD_REGISTER_IMM(1)); in intel_execlists_submission()
924 intel_logical_ring_emit(ringbuf, INSTPM); in intel_execlists_submission()
925 intel_logical_ring_emit(ringbuf, instp_mask << 16 | instp_mode); in intel_execlists_submission()
926 intel_logical_ring_advance(ringbuf); in intel_execlists_submission()
1012 struct intel_ringbuffer *ringbuf) in intel_lr_context_do_pin() argument
1024 ret = intel_pin_and_map_ringbuffer_obj(ring->dev, ringbuf); in intel_lr_context_do_pin()
1047 struct intel_ringbuffer *ringbuf = rq->ringbuf; in intel_lr_context_pin() local
1050 ret = intel_lr_context_do_pin(ring, ctx_obj, ringbuf); in intel_lr_context_pin()
1065 struct intel_ringbuffer *ringbuf = rq->ringbuf; in intel_lr_context_unpin() local
1070 intel_unpin_ringbuffer_obj(ringbuf); in intel_lr_context_unpin()
1080 struct intel_ringbuffer *ringbuf = req->ringbuf; in intel_logical_ring_workarounds_emit() local
1097 intel_logical_ring_emit(ringbuf, MI_LOAD_REGISTER_IMM(w->count)); in intel_logical_ring_workarounds_emit()
1099 intel_logical_ring_emit(ringbuf, w->reg[i].addr); in intel_logical_ring_workarounds_emit()
1100 intel_logical_ring_emit(ringbuf, w->reg[i].value); in intel_logical_ring_workarounds_emit()
1102 intel_logical_ring_emit(ringbuf, MI_NOOP); in intel_logical_ring_workarounds_emit()
1104 intel_logical_ring_advance(ringbuf); in intel_logical_ring_workarounds_emit()
1567 struct intel_ringbuffer *ringbuf = req->ringbuf; in intel_logical_ring_emit_pdps() local
1575 intel_logical_ring_emit(ringbuf, MI_LOAD_REGISTER_IMM(num_lri_cmds)); in intel_logical_ring_emit_pdps()
1579 intel_logical_ring_emit(ringbuf, GEN8_RING_PDP_UDW(ring, i)); in intel_logical_ring_emit_pdps()
1580 intel_logical_ring_emit(ringbuf, upper_32_bits(pd_daddr)); in intel_logical_ring_emit_pdps()
1581 intel_logical_ring_emit(ringbuf, GEN8_RING_PDP_LDW(ring, i)); in intel_logical_ring_emit_pdps()
1582 intel_logical_ring_emit(ringbuf, lower_32_bits(pd_daddr)); in intel_logical_ring_emit_pdps()
1585 intel_logical_ring_emit(ringbuf, MI_NOOP); in intel_logical_ring_emit_pdps()
1586 intel_logical_ring_advance(ringbuf); in intel_logical_ring_emit_pdps()
1594 struct intel_ringbuffer *ringbuf = req->ringbuf; in gen8_emit_bb_start() local
1621 intel_logical_ring_emit(ringbuf, MI_BATCH_BUFFER_START_GEN8 | in gen8_emit_bb_start()
1625 intel_logical_ring_emit(ringbuf, lower_32_bits(offset)); in gen8_emit_bb_start()
1626 intel_logical_ring_emit(ringbuf, upper_32_bits(offset)); in gen8_emit_bb_start()
1627 intel_logical_ring_emit(ringbuf, MI_NOOP); in gen8_emit_bb_start()
1628 intel_logical_ring_advance(ringbuf); in gen8_emit_bb_start()
1670 struct intel_ringbuffer *ringbuf = request->ringbuf; in gen8_emit_flush() local
1671 struct intel_engine_cs *ring = ringbuf->ring; in gen8_emit_flush()
1696 intel_logical_ring_emit(ringbuf, cmd); in gen8_emit_flush()
1697 intel_logical_ring_emit(ringbuf, in gen8_emit_flush()
1700 intel_logical_ring_emit(ringbuf, 0); /* upper addr */ in gen8_emit_flush()
1701 intel_logical_ring_emit(ringbuf, 0); /* value */ in gen8_emit_flush()
1702 intel_logical_ring_advance(ringbuf); in gen8_emit_flush()
1711 struct intel_ringbuffer *ringbuf = request->ringbuf; in gen8_emit_flush_render() local
1712 struct intel_engine_cs *ring = ringbuf->ring; in gen8_emit_flush_render()
1750 intel_logical_ring_emit(ringbuf, GFX_OP_PIPE_CONTROL(6)); in gen8_emit_flush_render()
1751 intel_logical_ring_emit(ringbuf, 0); in gen8_emit_flush_render()
1752 intel_logical_ring_emit(ringbuf, 0); in gen8_emit_flush_render()
1753 intel_logical_ring_emit(ringbuf, 0); in gen8_emit_flush_render()
1754 intel_logical_ring_emit(ringbuf, 0); in gen8_emit_flush_render()
1755 intel_logical_ring_emit(ringbuf, 0); in gen8_emit_flush_render()
1758 intel_logical_ring_emit(ringbuf, GFX_OP_PIPE_CONTROL(6)); in gen8_emit_flush_render()
1759 intel_logical_ring_emit(ringbuf, flags); in gen8_emit_flush_render()
1760 intel_logical_ring_emit(ringbuf, scratch_addr); in gen8_emit_flush_render()
1761 intel_logical_ring_emit(ringbuf, 0); in gen8_emit_flush_render()
1762 intel_logical_ring_emit(ringbuf, 0); in gen8_emit_flush_render()
1763 intel_logical_ring_emit(ringbuf, 0); in gen8_emit_flush_render()
1764 intel_logical_ring_advance(ringbuf); in gen8_emit_flush_render()
1809 struct intel_ringbuffer *ringbuf = request->ringbuf; in gen8_emit_request() local
1810 struct intel_engine_cs *ring = ringbuf->ring; in gen8_emit_request()
1826 intel_logical_ring_emit(ringbuf, cmd); in gen8_emit_request()
1827 intel_logical_ring_emit(ringbuf, in gen8_emit_request()
1830 intel_logical_ring_emit(ringbuf, 0); in gen8_emit_request()
1831 intel_logical_ring_emit(ringbuf, i915_gem_request_get_seqno(request)); in gen8_emit_request()
1832 intel_logical_ring_emit(ringbuf, MI_USER_INTERRUPT); in gen8_emit_request()
1833 intel_logical_ring_emit(ringbuf, MI_NOOP); in gen8_emit_request()
1840 intel_logical_ring_emit(ringbuf, MI_NOOP); in gen8_emit_request()
1841 intel_logical_ring_emit(ringbuf, MI_NOOP); in gen8_emit_request()
1842 intel_logical_ring_advance(ringbuf); in gen8_emit_request()
1957 ring->default_context->engine[ring->id].ringbuf); in logical_ring_init()
2245 struct intel_engine_cs *ring, struct intel_ringbuffer *ringbuf) in populate_lr_context() argument
2301 ((ringbuf->size - PAGE_SIZE) & RING_NR_PAGES) | RING_VALID; in populate_lr_context()
2399 struct intel_ringbuffer *ringbuf = in intel_lr_context_free() local
2400 ctx->engine[i].ringbuf; in intel_lr_context_free()
2401 struct intel_engine_cs *ring = ringbuf->ring; in intel_lr_context_free()
2404 intel_unpin_ringbuffer_obj(ringbuf); in intel_lr_context_free()
2408 intel_ringbuffer_free(ringbuf); in intel_lr_context_free()
2476 struct intel_ringbuffer *ringbuf; in intel_lr_context_deferred_alloc() local
2493 ringbuf = intel_engine_create_ringbuffer(ring, 4 * PAGE_SIZE); in intel_lr_context_deferred_alloc()
2494 if (IS_ERR(ringbuf)) { in intel_lr_context_deferred_alloc()
2495 ret = PTR_ERR(ringbuf); in intel_lr_context_deferred_alloc()
2499 ret = populate_lr_context(ctx, ctx_obj, ring, ringbuf); in intel_lr_context_deferred_alloc()
2505 ctx->engine[ring->id].ringbuf = ringbuf; in intel_lr_context_deferred_alloc()
2531 intel_ringbuffer_free(ringbuf); in intel_lr_context_deferred_alloc()
2534 ctx->engine[ring->id].ringbuf = NULL; in intel_lr_context_deferred_alloc()
2549 struct intel_ringbuffer *ringbuf = in intel_lr_context_reset() local
2550 ctx->engine[ring->id].ringbuf; in intel_lr_context_reset()
2569 ringbuf->head = 0; in intel_lr_context_reset()
2570 ringbuf->tail = 0; in intel_lr_context_reset()