Quoting Mika Kuoppala (2019-01-09 10:30:56)
> Chris Wilson <ch...@chris-wilson.co.uk> writes:
> 
> > Keep track of our wakeref used to keep the device awake so we can catch
> > any leak.
> >
> > Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
> > Cc: Jani Nikula <jani.nik...@intel.com>
> > ---
> >  drivers/gpu/drm/i915/i915_drv.h  |  2 ++
> >  drivers/gpu/drm/i915/i915_perf.c | 10 +++++-----
> >  2 files changed, 7 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/i915_drv.h 
> > b/drivers/gpu/drm/i915/i915_drv.h
> > index a20bd2ec48de..bf25ae92f5de 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.h
> > +++ b/drivers/gpu/drm/i915/i915_drv.h
> > @@ -1320,6 +1320,8 @@ struct i915_perf_stream {
> >        */
> >       struct list_head link;
> >  
> > +     intel_wakeref_t wakeref;
> > +
> >       /**
> >        * @sample_flags: Flags representing the `DRM_I915_PERF_PROP_SAMPLE_*`
> >        * properties given when opening a stream, representing the contents
> > diff --git a/drivers/gpu/drm/i915/i915_perf.c 
> > b/drivers/gpu/drm/i915/i915_perf.c
> > index e4dfd1477c78..b0cbad2e83c5 100644
> > --- a/drivers/gpu/drm/i915/i915_perf.c
> > +++ b/drivers/gpu/drm/i915/i915_perf.c
> > @@ -1364,14 +1364,14 @@ static void i915_oa_stream_destroy(struct 
> > i915_perf_stream *stream)
> >  
> >       free_oa_buffer(dev_priv);
> >  
> > +     put_oa_config(dev_priv, stream->oa_config);
> > +
> 
> Hmm you wanted to put this inside the wakeref. But
> I fail to see the reason.

I thought I undid it. Hazy memory says setup does it inside, but
teardown outside; consistency!
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to