All of lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Klaus Ethgen <Klaus+lkml@ethgen.de>,
	linux-kernel@vger.kernel.org,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [KERNEL] Regression bug in drm/i915, Wrong assumption in commit e11aa36 breaks suspend on at least lenovo x61
Date: Wed, 18 Feb 2015 18:24:52 +0200	[thread overview]
Message-ID: <1424276692.27236.1.camel@intel.com> (raw)
In-Reply-To: <87mw4bw7o7.fsf@intel.com>

On ke, 2015-02-18 at 17:39 +0200, Jani Nikula wrote:
> On Tue, 17 Feb 2015, Klaus Ethgen <Klaus+lkml@ethgen.de> wrote:
> > After solving  the conflicts, I applied the revert (see attachment) to
> > v3.18.7. I think it should also apply to the current head. With that
> > patch, suspend is working again on that version.
> >
> > However, I have not to deep knowledge of that subsystem, so please,
> > someone who have, have a deeper look into it. I especially do not know
> > if the lines in .../intel_pm.c are correct or better leaving them as
> > they are in v3.18.7.
> >
> > I want to have it working on a version that I know is stable before
> > asking to pull it to head.
> 
> Hi Klaus, we fear this patch may hide the actual cause. Would be useful
> to get a better description of what happens, along with a dmesg with
> drm.debug=14 module parameter set. This might clutter the mailing list,
> would you mind filing a bug at [1] and attach the info there?
> 
> Thanks,
> Jani.
> 
> [1] https://bugs.freedesktop.org/enter_bug.cgi?product=DRI&component=DRM/Intel

In addition to the above could you also try the following patch and
provide a dmesg log on the bugzilla ticket - at this point only to try
to narrow down the issue?:

diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index d358ce8..02c65f4 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -4466,6 +4466,14 @@ static irqreturn_t i965_irq_handler(int irq, void *arg)
 		I915_DISPLAY_PLANE_A_FLIP_PENDING_INTERRUPT |
 		I915_DISPLAY_PLANE_B_FLIP_PENDING_INTERRUPT;
 
+	if (!intel_irqs_enabled(dev_priv)) {
+		if (printk_ratelimit())
+			DRM_ERROR("spurious/shared interrupt iir %08x imr %08x ier %08x\n",
+				  I915_READ(IIR), I915_READ(IMR), I915_READ(IER));
+
+		return IRQ_NONE;
+	}
+
 	iir = I915_READ(IIR);
 
 	for (;;) {
@@ -4766,7 +4774,10 @@ void intel_runtime_pm_disable_interrupts(struct drm_device *dev)
 	struct drm_i915_private *dev_priv = dev->dev_private;
 
 	dev->driver->irq_uninstall(dev);
+
+	spin_lock_irq(&dev_priv->irq_lock);
 	dev_priv->pm._irqs_disabled = true;
+	spin_unlock_irq(&dev_priv->irq_lock);
 }
 
 /* Restore interrupts so we can recover from runtime PM. */
@@ -4774,7 +4785,10 @@ void intel_runtime_pm_restore_interrupts(struct drm_device *dev)
 {
 	struct drm_i915_private *dev_priv = dev->dev_private;
 
+	spin_lock_irq(&dev_priv->irq_lock);
 	dev_priv->pm._irqs_disabled = false;
+	spin_unlock_irq(&dev_priv->irq_lock);
+
 	dev->driver->irq_preinstall(dev);
 	dev->driver->irq_postinstall(dev);
 }

  reply	other threads:[~2015-02-18 16:24 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-11 11:39 Problems with suspend on recent kernel (not necessary a bug) Klaus Ethgen
2015-02-16 22:11 ` Regression bug in drm/i915, Wrong assumption in commit e11aa36 breaks suspend on at least lenovo x61 Klaus Ethgen
2015-02-16 22:17   ` Dave Airlie
2015-02-16 22:17     ` Dave Airlie
2015-02-17  8:29   ` [KERNEL] " Klaus Ethgen
2015-02-18 15:39     ` Jani Nikula
2015-02-18 15:39       ` Jani Nikula
2015-02-18 16:24       ` Imre Deak [this message]
2015-02-19 10:47         ` Dave Gordon
2015-02-19 10:47           ` [Intel-gfx] " Dave Gordon
2015-02-19 11:08           ` Imre Deak
2015-02-19 15:42             ` Dave Gordon
2015-02-19 15:42               ` [Intel-gfx] " Dave Gordon
2015-02-19 16:39               ` Imre Deak
2015-02-19 16:39                 ` Imre Deak
2015-02-18 19:03       ` [KERNEL] " Klaus Ethgen
2015-02-18 20:27         ` Imre Deak
2015-02-22 10:30         ` Daniel Vetter
2015-02-22 10:30           ` Daniel Vetter
2015-02-18 19:03       ` Klaus Ethgen
2015-02-18 19:03       ` Klaus Ethgen

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=1424276692.27236.1.camel@intel.com \
    --to=imre.deak@intel.com \
    --cc=Klaus+lkml@ethgen.de \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=linux-kernel@vger.kernel.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.