From patchwork Wed Feb 18 16:24:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Imre Deak X-Patchwork-Id: 5845181 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 655A19F373 for ; Wed, 18 Feb 2015 16:25:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8CFB920251 for ; Wed, 18 Feb 2015 16:25:27 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 7AA4020253 for ; Wed, 18 Feb 2015 16:25:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B3BF56E53E; Wed, 18 Feb 2015 08:25:25 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by gabe.freedesktop.org (Postfix) with ESMTP id 5362D89F97; Wed, 18 Feb 2015 08:25:24 -0800 (PST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP; 18 Feb 2015 08:24:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,602,1418112000"; d="scan'208";a="679844065" Received: from ideak-desk.fi.intel.com ([10.237.72.74]) by fmsmga002.fm.intel.com with ESMTP; 18 Feb 2015 08:24:52 -0800 Message-ID: <1424276692.27236.1.camel@intel.com> Subject: Re: [Intel-gfx] [KERNEL] Regression bug in drm/i915, Wrong assumption in commit e11aa36 breaks suspend on at least lenovo x61 From: Imre Deak To: Jani Nikula Date: Wed, 18 Feb 2015 18:24:52 +0200 In-Reply-To: <87mw4bw7o7.fsf@intel.com> References: <20150211113919.GA5672@ikki.ethgen.ch> <20150216221142.GB14602@ikki.ethgen.ch> <20150217082937.GA27873@ikki.ethgen.ch> <87mw4bw7o7.fsf@intel.com> Organization: Intel X-Mailer: Evolution 3.12.7-0ubuntu1 Mime-Version: 1.0 Cc: Klaus Ethgen , "intel-gfx@lists.freedesktop.org" , linux-kernel@vger.kernel.org, dri-devel X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: imre.deak@intel.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On ke, 2015-02-18 at 17:39 +0200, Jani Nikula wrote: > On Tue, 17 Feb 2015, Klaus Ethgen 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); }