Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756234AbbBQI3q (ORCPT ); Tue, 17 Feb 2015 03:29:46 -0500 Received: from tschil.ethgen.ch ([5.9.7.51]:54075 "EHLO tschil.ethgen.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752125AbbBQI3o (ORCPT ); Tue, 17 Feb 2015 03:29:44 -0500 Date: Tue, 17 Feb 2015 09:29:41 +0100 From: Klaus Ethgen To: linux-kernel@vger.kernel.org Cc: Daniel Vetter , dri-devel Subject: Re: [KERNEL] Regression bug in drm/i915, Wrong assumption in commit e11aa36 breaks suspend on at least lenovo x61 Message-ID: <20150217082937.GA27873@ikki.ethgen.ch> References: <20150211113919.GA5672@ikki.ethgen.ch> <20150216221142.GB14602@ikki.ethgen.ch> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="BwCQnh7xodEAoBMC" Content-Disposition: inline In-Reply-To: <20150216221142.GB14602@ikki.ethgen.ch> OpenPGP: id=79D0B06F4E20AF1C; url=http://www.ethgen.ch/~klaus/79D0B06F4E20AF1C.txt; preference=signencrypt User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 4318 Lines: 123 --BwCQnh7xodEAoBMC Content-Type: multipart/mixed; boundary="LQksG6bCIzRHxTLp" Content-Disposition: inline --LQksG6bCIzRHxTLp Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline 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. Regards Klaus -- Klaus Ethgen http://www.ethgen.ch/ pub 4096R/4E20AF1C 2011-05-16 Klaus Ethgen Fingerprint: 85D4 CA42 952C 949B 1753 62B3 79D0 B06F 4E20 AF1C --LQksG6bCIzRHxTLp Content-Type: text/x-diff; charset=iso-8859-1 Content-Disposition: attachment; filename="0001-Revert-drm-i915-use-runtime-irq-suspend-resume-in-fr.patch" >From b9831d771ea7f416f3ab1c992f67c7523f34ecbd Mon Sep 17 00:00:00 2001 From: Klaus Ethgen Date: Mon, 16 Feb 2015 23:20:41 +0100 Subject: [PATCH] Revert "drm/i915: use runtime irq suspend/resume in freeze/thaw" It is a wrong assumption that disabling the interrupts is enough. This reverts commit e11aa362308f5de467ce355a2a2471321b15a35c. --- drivers/gpu/drm/i915/i915_drv.c | 5 +++-- drivers/gpu/drm/i915/intel_pm.c | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 9256973..bc390da 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -575,7 +575,7 @@ static int i915_drm_freeze(struct drm_device *dev) flush_delayed_work(&dev_priv->rps.delayed_resume_work); - intel_runtime_pm_disable_interrupts(dev); + drm_irq_uninstall(dev); intel_hpd_cancel_work(dev_priv); intel_suspend_encoders(dev_priv); @@ -680,7 +680,8 @@ static int __i915_drm_thaw(struct drm_device *dev, bool restore_gtt_mappings) } mutex_unlock(&dev->struct_mutex); - intel_runtime_pm_restore_interrupts(dev); + /* We need working interrupts for modeset enabling ... */ + drm_irq_install(dev, dev->pdev->irq); intel_modeset_init_hw(dev); diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index 83c7ecf..ee68ba9 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -5195,7 +5195,7 @@ void intel_suspend_gt_powersave(struct drm_device *dev) struct drm_i915_private *dev_priv = dev->dev_private; /* Interrupts should be disabled already to avoid re-arming. */ - WARN_ON(intel_irqs_enabled(dev_priv)); + WARN_ON(dev->irq_enabled); flush_delayed_work(&dev_priv->rps.delayed_resume_work); @@ -5210,7 +5210,7 @@ void intel_disable_gt_powersave(struct drm_device *dev) struct drm_i915_private *dev_priv = dev->dev_private; /* Interrupts should be disabled already to avoid re-arming. */ - WARN_ON(intel_irqs_enabled(dev_priv)); + WARN_ON(dev->irq_enabled); if (IS_IRONLAKE_M(dev)) { ironlake_disable_drps(dev); -- 2.1.4 --LQksG6bCIzRHxTLp-- --BwCQnh7xodEAoBMC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQGcBAEBCgAGBQJU4vvqAAoJEKZ8CrGAGfasn3EMAJPepl2TdvEqFbSOYchfAiMK RM/UxX9kfo1oPKjjwq3jMEnHRGjyhpFxsScn8JgbQBLdFb4I+22N9C+cfXbwViK0 UnthozNHEAyC/0+3hrPU34SeXglJs6pFst9nHF+0KXDsTq/LUcLc7XOH33j9KAUq qZonDFJ8f0E+zPdOHCcCf8UpBXsIEfRuKRnaReqsrWhwbZVtk9D+s0/mjP8Pznku mvqJsLG28CkS9maBMoXeRviXFiN6PUd9viWsTfrFZTWoCjBbIZ1EzvsiubjJwKz8 QzYoG28+9hVj8hsLC92DmPTa3epNA8/KvAkt2xY9ouIj4DSVbiGDnJIgXXHlhlR7 NReXeN8F3Qy7XFX3d+/mpKhSLViqeoU27+XqQQkurisYu9C8UqABmILm16UmuNWH QoaXvhTtd30+YT7xRM9Edl47USudpQ9YhSnRD4xrKpyQ8krvc0F+B4RD9apDhdhA NVoEybWTRyLrP+7axr1tZmMRi0t8hI2NSOHsZNjYqQ== =/7bD -----END PGP SIGNATURE----- --BwCQnh7xodEAoBMC-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/