All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH] drm/i915: Restore interrupt enabling after a reset
Date: Fri, 15 Feb 2019 22:03:55 +0000	[thread overview]
Message-ID: <20190215220355.26146-1-chris@chris-wilson.co.uk> (raw)

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.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
This feels a bit hairy, so maybe limit it to
INTEL_INFO()->reset_clobbers_display? Or even introduce
reset_clobbers_interrupt with the same platforms as clobbers_display?
-Chris
---
 drivers/gpu/drm/i915/i915_reset.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_reset.c b/drivers/gpu/drm/i915/i915_reset.c
index 5a067a4b3d5d..451233709d1a 100644
--- a/drivers/gpu/drm/i915/i915_reset.c
+++ b/drivers/gpu/drm/i915/i915_reset.c
@@ -675,8 +675,14 @@ static int gt_reset(struct drm_i915_private *i915, unsigned int stalled_mask)
 {
 	struct intel_engine_cs *engine;
 	enum intel_engine_id id;
+	unsigned long flags;
 	int err;
 
+	/* Restore IER as it may get clobbered on some platforms! (i965g[m]) */
+	spin_lock_irqsave(&i915->irq_lock, flags);
+	i915->drm.driver->irq_postinstall(&i915->drm);
+	spin_unlock_irqrestore(&i915->irq_lock, flags);
+
 	/*
 	 * Everything depends on having the GTT running, so we need to start
 	 * there.
@@ -690,7 +696,7 @@ static int gt_reset(struct drm_i915_private *i915, unsigned int stalled_mask)
 
 	i915_gem_restore_fences(i915);
 
-	return err;
+	return 0;
 }
 
 static void reset_finish_engine(struct intel_engine_cs *engine)
-- 
2.20.1

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

             reply	other threads:[~2019-02-15 22:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-15 22:03 Chris Wilson [this message]
2019-02-15 22:30 ` [PATCH v2] drm/i915: Restore interrupt enabling after a reset 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ä
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 ` [LKP] [drm/i915] a8f0ef1fee: piglit.igt.gem_reset_stats.close-pending-fork-reverse-blt.dmesg-warn kernel test robot
2019-03-18 13:50   ` 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=20190215220355.26146-1-chris@chris-wilson.co.uk \
    --to=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.