Re: [PATCH] drm/i915: Keep rings pinned while the context is active

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Tvrtko Ursulin (2019-06-19 15:35:41)
> 
> On 19/06/2019 14:44, Chris Wilson wrote:
> > Remember to keep the rings pinned as well as the context image until the
> > GPU is no longer active.
> > 
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110946
> > Fixes: ce476c80b8bf ("drm/i915: Keep contexts pinned until after the next kernel context switch")
> > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> > Cc: Mika Kuoppala <mika.kuoppala@xxxxxxxxxxxxxxx>
> > Cc: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
> > ---
> >   drivers/gpu/drm/i915/gt/intel_context.c | 17 ++++++++++++-----
> >   drivers/gpu/drm/i915/gt/intel_lrc.c     |  9 +--------
> >   2 files changed, 13 insertions(+), 13 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/gt/intel_context.c b/drivers/gpu/drm/i915/gt/intel_context.c
> > index 2c454f227c2e..b84f11a52d88 100644
> > --- a/drivers/gpu/drm/i915/gt/intel_context.c
> > +++ b/drivers/gpu/drm/i915/gt/intel_context.c
> > @@ -126,6 +126,7 @@ static void intel_context_retire(struct i915_active *active)
> >       if (ce->state)
> >               __context_unpin_state(ce->state);
> >   
> > +     intel_ring_unpin(ce->ring);
> >       intel_context_put(ce);
> >   }
> >   
> > @@ -160,15 +161,16 @@ int intel_context_active_acquire(struct intel_context *ce, unsigned long flags)
> >   
> >       intel_context_get(ce);
> >   
> > +     err = intel_ring_pin(ce->ring);
> > +     if (err)
> > +             goto err_put;
> > +
> >       if (!ce->state)
> >               return 0;
> >   
> >       err = __context_pin_state(ce->state, flags);
> > -     if (err) {
> > -             i915_active_cancel(&ce->active);
> > -             intel_context_put(ce);
> > -             return err;
> > -     }
> > +     if (err)
> > +             goto err_put;
> 
> intel_ring_unpin?

Gah I did... A mistake when rebasing :(
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux