[v2] drm/i915/guc: Flush the residual log capture irq on disabling

Submitted by Chris Wilson on Feb. 21, 2019, 4:38 p.m.

Details

Message ID 20190221163833.21393-1-chris@chris-wilson.co.uk
State Accepted
Commit 07c100b187332101220baf7446b4f09296d7c59b
Headers show
Series "drm/i915/guc: Flush the residual log capture irq on disabling" ( rev: 1 ) in Intel GFX

Not browsing as part of any series.

Commit Message

Chris Wilson Feb. 21, 2019, 4:38 p.m.
As we disable the log capture events, flush any residual interrupt
before we flush and disable the worker.

v2: Mika pointed out that it wasn't the worker re-queueing itself, but a
rogue irq.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109716
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
---
 drivers/gpu/drm/i915/intel_guc_log.c | 5 +++++
 1 file changed, 5 insertions(+)

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/i915/intel_guc_log.c b/drivers/gpu/drm/i915/intel_guc_log.c
index 806fdfd7c78a..7146524264dd 100644
--- a/drivers/gpu/drm/i915/intel_guc_log.c
+++ b/drivers/gpu/drm/i915/intel_guc_log.c
@@ -620,7 +620,12 @@  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_i915(guc);
+
 	guc_log_disable_flush_events(log);
+	synchronize_irq(i915->drm.irq);
+
 	flush_work(&log->relay.flush_work);
 
 	mutex_lock(&log->relay.lock);

Comments

Chris Wilson <chris@chris-wilson.co.uk> writes:

> As we disable the log capture events, flush any residual interrupt
> before we flush and disable the worker.
>
> v2: Mika pointed out that it wasn't the worker re-queueing itself, but a
> rogue irq.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109716
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>

Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>

> ---
>  drivers/gpu/drm/i915/intel_guc_log.c | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/intel_guc_log.c b/drivers/gpu/drm/i915/intel_guc_log.c
> index 806fdfd7c78a..7146524264dd 100644
> --- a/drivers/gpu/drm/i915/intel_guc_log.c
> +++ b/drivers/gpu/drm/i915/intel_guc_log.c
> @@ -620,7 +620,12 @@ 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_i915(guc);
> +
>  	guc_log_disable_flush_events(log);
> +	synchronize_irq(i915->drm.irq);
> +
>  	flush_work(&log->relay.flush_work);
>  
>  	mutex_lock(&log->relay.lock);
> -- 
> 2.20.1
Quoting Mika Kuoppala (2019-02-22 11:19:31)
> Chris Wilson <chris@chris-wilson.co.uk> writes:
> 
> > As we disable the log capture events, flush any residual interrupt
> > before we flush and disable the worker.
> >
> > v2: Mika pointed out that it wasn't the worker re-queueing itself, but a
> > rogue irq.
> >
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109716
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> 
> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>

Thanks for the correction! Pushed,
-Chris