Message ID | 20190221123252.28550-1-chris@chris-wilson.co.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/i915/guc: Flush the residual log capture after disabling | expand |
Chris Wilson <chris@chris-wilson.co.uk> writes: > After we have marked the log capture as disabled, then flush the log > capture worker so that it will not re-queue itself. It is not the worker that re-queues so remove the re-queue part. Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com> > > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109716 > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> > --- > drivers/gpu/drm/i915/intel_guc_log.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_guc_log.c b/drivers/gpu/drm/i915/intel_guc_log.c > index 806fdfd7c78a..020eeac6d228 100644 > --- a/drivers/gpu/drm/i915/intel_guc_log.c > +++ b/drivers/gpu/drm/i915/intel_guc_log.c > @@ -241,7 +241,7 @@ static void guc_read_update_log_buffer(struct intel_guc_log *log) > > mutex_lock(&log->relay.lock); > > - if (WARN_ON(!intel_guc_log_relay_enabled(log))) > + if (!intel_guc_log_relay_enabled(log)) > goto out_unlock; > > /* Get the pointer to shared GuC log buffer */ > @@ -621,13 +621,14 @@ void intel_guc_log_relay_flush(struct intel_guc_log *log) > void intel_guc_log_relay_close(struct intel_guc_log *log) > { > guc_log_disable_flush_events(log); > - flush_work(&log->relay.flush_work); > > mutex_lock(&log->relay.lock); > GEM_BUG_ON(!intel_guc_log_relay_enabled(log)); > guc_log_unmap(log); > guc_log_relay_destroy(log); > mutex_unlock(&log->relay.lock); > + > + flush_work(&log->relay.flush_work); > } > > void intel_guc_log_handle_flush_event(struct intel_guc_log *log) > -- > 2.20.1 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Mika Kuoppala (2019-02-21 16:24:06) > Chris Wilson <chris@chris-wilson.co.uk> writes: > > > After we have marked the log capture as disabled, then flush the log > > capture worker so that it will not re-queue itself. > > It is not the worker that re-queues so remove the re-queue part. Yeah, we are definitely missing a synchronize_irq() after guc_log_disable_flush_events() as well. > Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com> Care to keep the r-b with > > @@ -621,13 +621,14 @@ void intel_guc_log_relay_flush(struct intel_guc_log *log) > > void intel_guc_log_relay_close(struct intel_guc_log *log) > > { > > guc_log_disable_flush_events(log); + synchronize_irq(i915->drm.irq); ? -Chris
diff --git a/drivers/gpu/drm/i915/intel_guc_log.c b/drivers/gpu/drm/i915/intel_guc_log.c index 806fdfd7c78a..020eeac6d228 100644 --- a/drivers/gpu/drm/i915/intel_guc_log.c +++ b/drivers/gpu/drm/i915/intel_guc_log.c @@ -241,7 +241,7 @@ static void guc_read_update_log_buffer(struct intel_guc_log *log) mutex_lock(&log->relay.lock); - if (WARN_ON(!intel_guc_log_relay_enabled(log))) + if (!intel_guc_log_relay_enabled(log)) goto out_unlock; /* Get the pointer to shared GuC log buffer */ @@ -621,13 +621,14 @@ void intel_guc_log_relay_flush(struct intel_guc_log *log) void intel_guc_log_relay_close(struct intel_guc_log *log) { guc_log_disable_flush_events(log); - flush_work(&log->relay.flush_work); mutex_lock(&log->relay.lock); GEM_BUG_ON(!intel_guc_log_relay_enabled(log)); guc_log_unmap(log); guc_log_relay_destroy(log); mutex_unlock(&log->relay.lock); + + flush_work(&log->relay.flush_work); } void intel_guc_log_handle_flush_event(struct intel_guc_log *log)
After we have marked the log capture as disabled, then flush the log capture worker so that it will not re-queue itself. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109716 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> --- drivers/gpu/drm/i915/intel_guc_log.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)