[Intel-gfx] [PATCH 4/6] drm/i915: Move timeline from GTT to ring
Chris Wilson
chris at chris-wilson.co.uk
Mon Apr 23 12:51:12 UTC 2018
Quoting Tvrtko Ursulin (2018-04-23 11:44:19)
>
> On 23/04/2018 11:13, Chris Wilson wrote:
> > diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
> > index 0097a77fae8d..1635975dbc16 100644
> > --- a/drivers/gpu/drm/i915/i915_gem.c
> > +++ b/drivers/gpu/drm/i915/i915_gem.c
> > @@ -3110,10 +3110,10 @@ static void engine_skip_context(struct i915_request *request)
> > {
> > struct intel_engine_cs *engine = request->engine;
> > struct i915_gem_context *hung_ctx = request->ctx;
> > - struct intel_timeline *timeline;
> > + struct intel_timeline *timeline = request->timeline;
> > unsigned long flags;
> >
> > - timeline = i915_gem_context_lookup_timeline(hung_ctx, engine);
> > + GEM_BUG_ON(timeline == engine->timeline);
>
> Isn't this the guilty request, so would be on the engine timeline?
request->timeline is always the client timeline, so we can move it back
to the client on being preempted.
> > diff --git a/drivers/gpu/drm/i915/i915_request.c b/drivers/gpu/drm/i915/i915_request.c
> > index 534b8d684cef..35869afdb199 100644
> > --- a/drivers/gpu/drm/i915/i915_request.c
> > +++ b/drivers/gpu/drm/i915/i915_request.c
> > @@ -639,6 +639,7 @@ i915_request_alloc(struct intel_engine_cs *engine, struct i915_gem_context *ctx)
> > if (IS_ERR(ring))
> > return ERR_CAST(ring);
> > GEM_BUG_ON(!ring);
> > + GEM_BUG_ON(ring->timeline == engine->timeline);
>
> It's debugging only but feels out of place. Put it in
> intel_engine_create_ring?
Not quite, I can move it down, the point is that rq->timeline !=
engine->timeline. Maybe a bit of s/rq->timeline/rq->user_timeline/?
-Chris
More information about the Intel-gfx
mailing list