From 75d0a7f31eec8ec4a53b4485905800e09dc5091f Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Fri, 9 Aug 2019 19:25:18 +0100 Subject: drm/i915: Lift timeline into intel_context Move the timeline from being inside the intel_ring to intel_context itself. This saves much pointer dancing and makes the relations of the context to its timeline much clearer. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Link: https://patchwork.freedesktop.org/patch/msgid/20190809182518.20486-4-chris@chris-wilson.co.uk --- drivers/gpu/drm/i915/i915_active.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/gpu/drm/i915/i915_active.c') diff --git a/drivers/gpu/drm/i915/i915_active.c b/drivers/gpu/drm/i915/i915_active.c index 1e09722b5317..7698fcaa648a 100644 --- a/drivers/gpu/drm/i915/i915_active.c +++ b/drivers/gpu/drm/i915/i915_active.c @@ -246,7 +246,7 @@ static bool __active_del_barrier(struct i915_active *ref, struct llist_node *head = NULL, *tail = NULL; struct llist_node *pos, *next; - GEM_BUG_ON(node->timeline != engine->kernel_context->ring->timeline->fence_context); + GEM_BUG_ON(node->timeline != engine->kernel_context->timeline->fence_context); /* * Rebuild the llist excluding our node. We may perform this @@ -568,7 +568,7 @@ int i915_active_acquire_preallocate_barrier(struct i915_active *ref, * i915_active_acquire_barrier() */ for_each_engine_masked(engine, i915, mask, tmp) { - u64 idx = engine->kernel_context->ring->timeline->fence_context; + u64 idx = engine->kernel_context->timeline->fence_context; struct active_node *node; node = reuse_idle_barrier(ref, idx); @@ -665,7 +665,7 @@ void i915_request_add_active_barriers(struct i915_request *rq) struct llist_node *node, *next; GEM_BUG_ON(intel_engine_is_virtual(engine)); - GEM_BUG_ON(rq->timeline != engine->kernel_context->ring->timeline); + GEM_BUG_ON(rq->timeline != engine->kernel_context->timeline); /* * Attach the list of proto-fences to the in-flight request such -- cgit