Lines Matching defs:ring
41 * something like a context does exist for the media ring, the code only
42 * supports contexts for the render ring.
171 /* The ring associated with the context object is handled by the normal
172 * object tracking code. We give an initial ring value simple to pass an
175 ctx->ring = &dev_priv->ring[RCS];
209 return (ctx == ctx->ring->default_context);
213 * The default context needs to exist per ring that uses contexts. It stores the
234 dev_priv->ring[RCS].default_context = ctx;
269 dev_priv->ring[RCS].default_context)
292 struct i915_hw_context *dctx = dev_priv->ring[RCS].default_context;
325 i915_gem_context_get_hang_stats(struct intel_ring_buffer *ring,
329 struct drm_i915_private *dev_priv = ring->dev->dev_private;
336 if (ring->id != RCS)
369 mi_set_context(struct intel_ring_buffer *ring,
377 * explicitly, so we rely on the value at ring init, stored in
380 if (IS_GEN6(ring->dev) && ring->itlb_before_ctx_switch) {
381 ret = ring->flush(ring, I915_GEM_GPU_DOMAINS, 0);
386 ret = intel_ring_begin(ring, 6);
391 if (IS_GEN7(ring->dev))
392 intel_ring_emit(ring, MI_ARB_ON_OFF | MI_ARB_DISABLE);
394 intel_ring_emit(ring, MI_NOOP);
396 intel_ring_emit(ring, MI_NOOP);
397 intel_ring_emit(ring, MI_SET_CONTEXT);
398 intel_ring_emit(ring, new_context->obj->gtt_offset |
404 intel_ring_emit(ring, MI_NOOP);
406 if (IS_GEN7(ring->dev))
407 intel_ring_emit(ring, MI_ARB_ON_OFF | MI_ARB_ENABLE);
409 intel_ring_emit(ring, MI_NOOP);
411 intel_ring_advance(ring);
418 struct intel_ring_buffer *ring = to->ring;
419 struct i915_hw_context *from = ring->last_context;
454 ret = mi_set_context(ring, to, hw_flags);
468 i915_gem_object_move_to_active(from->obj, ring);
477 BUG_ON(from->obj->ring != ring);
479 ret = i915_add_request(ring, NULL);
486 WARN_ON(mi_set_context(ring, from, MI_RESTORE_INHIBIT));
495 ring->last_context = to;
503 * @ring: ring for which we'll execute the context switch
514 int i915_switch_context(struct intel_ring_buffer *ring,
518 struct drm_i915_private *dev_priv = ring->dev->dev_private;
526 if (ring != &dev_priv->ring[RCS])
530 to = ring->default_context;