[Intel-gfx] [PATCH] drm/i915/guc: Flush the CT worker after updating log controls

Chris Wilson chris at chris-wilson.co.uk
Thu Jul 18 12:59:41 UTC 2019


Quoting Michal Wajdeczko (2019-07-18 13:53:47)
> On Thu, 18 Jul 2019 10:02:03 +0200, Chris Wilson  
> <chris at chris-wilson.co.uk> wrote:
> 
> ...
> 
> > diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c  
> > b/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
> > index 77fda1e85d3b..e80c1eb309ee 100644
> > --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
> > +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_log.c
> > @@ -613,12 +613,11 @@ void intel_guc_log_relay_flush(struct  
> > intel_guc_log *log)
> >  void intel_guc_log_relay_close(struct intel_guc_log *log)
> >  {
> >       struct intel_guc *guc = log_to_guc(log);
> > -     struct drm_i915_private *i915 = guc_to_gt(guc)->i915;
> >       guc_log_disable_flush_events(log);
> > -     intel_synchronize_irq(i915);
> > -     flush_work(&log->relay.flush_work);
> > +     flush_work(&guc->ct.worker);
> 
> We don't need to touch ct.worker here as in above call to
> guc_log_disable_flush_events() we will turn off handling of
> all log events (they will be dropped if processed later by
> the ct.worker in intel_guc_to_host_process_recv_msg)

But... The check on guc->msg_enabled_mask is unserialised and you must
flush the worker to flush a concurrent enqueue as we cancel the
flush_work. Previously that was given by the sync_irq, but the
queue_work is no longer inside the irq, so it does nothing.
-Chris


More information about the Intel-gfx mailing list