All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2] drm/i915: Restore interrupt enabling after a reset
Date: Mon, 18 Feb 2019 17:38:49 +0200	[thread overview]
Message-ID: <20190218153849.GU20097@intel.com> (raw)
In-Reply-To: <20190218153106.16768-1-chris@chris-wilson.co.uk>

On Mon, Feb 18, 2019 at 03:31:06PM +0000, Chris Wilson wrote:
> At least on i965g and i965gm, performing a device reset clobbers the IER
> resulting in loss of interrupts thereafter. So, run the irq_postinstall
> hook to restore them.
> 
> v2: Ville pointed out that he already attempted to solve this problem by
> reinstall the interrupts in intel_reset_finish() (part of the display
> handling around reset). However, reinstalling the irq clobbers the
> i915->irq_mask which we need for handling MI_USER_INTERRUPTS, and does
> so too late to handle any interrupts generating from resuming the rings.
> The simple solution to both is to pull the interrupt reenabling from
> afterwards to around the device reset.
> 
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/i915_reset.c    | 6 ++++++
>  drivers/gpu/drm/i915/intel_display.c | 3 ---
>  2 files changed, 6 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_reset.c b/drivers/gpu/drm/i915/i915_reset.c
> index 1911e00d2581..4df4c674223d 100644
> --- a/drivers/gpu/drm/i915/i915_reset.c
> +++ b/drivers/gpu/drm/i915/i915_reset.c
> @@ -995,11 +995,17 @@ void i915_reset(struct drm_i915_private *i915,
>  		goto error;
>  	}
>  
> +	if (INTEL_INFO(i915)->gpu_reset_clobbers_display)
> +		intel_runtime_pm_disable_interrupts(i915);
> +
>  	if (do_reset(i915, stalled_mask)) {
>  		dev_err(i915->drm.dev, "Failed to reset chip\n");
>  		goto taint;
>  	}
>  
> +	if (INTEL_INFO(i915)->gpu_reset_clobbers_display)
> +		intel_runtime_pm_enable_interrupts(i915);
> +

Looks quite sensible to me.

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

>  	intel_overlay_reset(i915);
>  
>  	/*
> diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> index afa21daaae51..3b4a6eeb4573 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -3931,9 +3931,6 @@ void intel_finish_reset(struct drm_i915_private *dev_priv)
>  		 * The display has been reset as well,
>  		 * so need a full re-initialization.
>  		 */
> -		intel_runtime_pm_disable_interrupts(dev_priv);
> -		intel_runtime_pm_enable_interrupts(dev_priv);
> -
>  		intel_pps_unlock_regs_wa(dev_priv);
>  		intel_modeset_init_hw(dev);
>  		intel_init_clock_gating(dev_priv);
> -- 
> 2.20.1

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-02-18 15:38 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-15 22:03 [PATCH] drm/i915: Restore interrupt enabling after a reset Chris Wilson
2019-02-15 22:30 ` [PATCH v2] " Chris Wilson
2019-02-15 23:42 ` [PATCH v3] " Chris Wilson
2019-02-16  0:11 ` ✗ Fi.CI.BAT: failure for drm/i915: Restore interrupt enabling after a reset (rev2) Patchwork
2019-02-16  1:12 ` ✗ Fi.CI.BAT: failure for drm/i915: Restore interrupt enabling after a reset (rev3) Patchwork
2019-02-18  9:10 ` [PATCH] drm/i915: Restore interrupt enabling after a reset Chris Wilson
2019-02-18 10:36 ` ✓ Fi.CI.BAT: success for drm/i915: Restore interrupt enabling after a reset (rev4) Patchwork
2019-02-18 13:47 ` ✓ Fi.CI.IGT: " Patchwork
2019-02-18 15:31 ` [PATCH v2] drm/i915: Restore interrupt enabling after a reset Chris Wilson
2019-02-18 15:38   ` Ville Syrjälä [this message]
2019-02-18 16:16 ` ✓ Fi.CI.BAT: success for drm/i915: Restore interrupt enabling after a reset (rev5) Patchwork
2019-02-18 20:21 ` ✓ Fi.CI.IGT: " Patchwork
2019-03-18 13:50 ` [drm/i915] a8f0ef1fee: piglit.igt.gem_reset_stats.close-pending-fork-reverse-blt.dmesg-warn kernel test robot
2019-03-18 13:50   ` [LKP] " kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190218153849.GU20097@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.