Lines Matching refs:ce
169 struct intel_context *ce);
223 struct intel_context *ce) in intel_lr_context_descriptor_update() argument
233 desc |= i915_ggtt_offset(ce->state) + LRC_HEADER_PAGES * PAGE_SIZE; in intel_lr_context_descriptor_update()
259 ce->lrc_desc = desc; in intel_lr_context_descriptor_update()
420 struct intel_context *ce = rq->hw_context; in execlists_update_context() local
423 u32 *reg_state = ce->lrc_reg_state; in execlists_update_context()
435 return ce->lrc_desc; in execlists_update_context()
507 static bool ctx_single_port_submission(const struct intel_context *ce) in ctx_single_port_submission() argument
510 i915_gem_context_force_single_submission(ce->gem_context)); in ctx_single_port_submission()
538 struct intel_context *ce = in inject_preempt_context() local
543 upper_32_bits(ce->lrc_desc)); in inject_preempt_context()
544 GEM_BUG_ON((ce->lrc_reg_state[CTX_CONTEXT_CONTROL + 1] & in inject_preempt_context()
558 write_desc(execlists, ce->lrc_desc, n); in inject_preempt_context()
1265 static void execlists_context_destroy(struct intel_context *ce) in execlists_context_destroy() argument
1267 GEM_BUG_ON(ce->pin_count); in execlists_context_destroy()
1269 if (!ce->state) in execlists_context_destroy()
1272 intel_ring_free(ce->ring); in execlists_context_destroy()
1274 GEM_BUG_ON(i915_gem_object_is_active(ce->state->obj)); in execlists_context_destroy()
1275 i915_gem_object_put(ce->state->obj); in execlists_context_destroy()
1278 static void execlists_context_unpin(struct intel_context *ce) in execlists_context_unpin() argument
1280 intel_ring_unpin(ce->ring); in execlists_context_unpin()
1282 ce->state->obj->pin_global--; in execlists_context_unpin()
1283 i915_gem_object_unpin_map(ce->state->obj); in execlists_context_unpin()
1284 i915_vma_unpin(ce->state); in execlists_context_unpin()
1286 i915_gem_context_put(ce->gem_context); in execlists_context_unpin()
1315 struct intel_context *ce) in __execlists_context_pin() argument
1320 ret = execlists_context_deferred_alloc(ctx, engine, ce); in __execlists_context_pin()
1323 GEM_BUG_ON(!ce->state); in __execlists_context_pin()
1325 ret = __context_pin(ctx, ce->state); in __execlists_context_pin()
1329 vaddr = i915_gem_object_pin_map(ce->state->obj, I915_MAP_WB); in __execlists_context_pin()
1335 ret = intel_ring_pin(ce->ring, ctx->i915, ctx->ggtt_offset_bias); in __execlists_context_pin()
1339 intel_lr_context_descriptor_update(ctx, engine, ce); in __execlists_context_pin()
1341 ce->lrc_reg_state = vaddr + LRC_STATE_PN * PAGE_SIZE; in __execlists_context_pin()
1342 ce->lrc_reg_state[CTX_RING_BUFFER_START+1] = in __execlists_context_pin()
1343 i915_ggtt_offset(ce->ring->vma); in __execlists_context_pin()
1344 GEM_BUG_ON(!intel_ring_offset_valid(ce->ring, ce->ring->head)); in __execlists_context_pin()
1345 ce->lrc_reg_state[CTX_RING_HEAD+1] = ce->ring->head; in __execlists_context_pin()
1347 ce->state->obj->pin_global++; in __execlists_context_pin()
1349 return ce; in __execlists_context_pin()
1352 i915_gem_object_unpin_map(ce->state->obj); in __execlists_context_pin()
1354 __i915_vma_unpin(ce->state); in __execlists_context_pin()
1356 ce->pin_count = 0; in __execlists_context_pin()
1369 struct intel_context *ce = to_intel_context(ctx, engine); in execlists_context_pin() local
1373 if (likely(ce->pin_count++)) in execlists_context_pin()
1374 return ce; in execlists_context_pin()
1375 GEM_BUG_ON(!ce->pin_count); /* no overflow please! */ in execlists_context_pin()
1377 ce->ops = &execlists_context_ops; in execlists_context_pin()
1379 return __execlists_context_pin(engine, ctx, ce); in execlists_context_pin()
2415 struct intel_context *ce = in logical_ring_init() local
2419 upper_32_bits(ce->lrc_desc); in logical_ring_init()
2722 struct intel_context *ce) in execlists_context_deferred_alloc() argument
2731 if (ce->state) in execlists_context_deferred_alloc()
2771 ce->ring = ring; in execlists_context_deferred_alloc()
2772 ce->state = vma; in execlists_context_deferred_alloc()
2801 struct intel_context *ce = in intel_lr_context_resume() local
2805 if (!ce->state) in intel_lr_context_resume()
2808 reg = i915_gem_object_pin_map(ce->state->obj, in intel_lr_context_resume()
2817 ce->state->obj->mm.dirty = true; in intel_lr_context_resume()
2818 i915_gem_object_unpin_map(ce->state->obj); in intel_lr_context_resume()
2820 intel_ring_reset(ce->ring, 0); in intel_lr_context_resume()