Re: [KERNEL] Regression bug in drm/i915, Wrong assumption in commit e11aa36 breaks suspend on at least lenovo x61

Klaus Ethgen
2015-02-17T08:29:46Z

[-- Attachment #1.1: Type: text/plain, Size: 729 bytes --]

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 <Klaus@Ethgen.de>
Fingerprint: 85D4 CA42 952C 949B 1753 62B3 79D0 B06F 4E20 AF1C

[-- Attachment #1.2: 0001-Revert-drm-i915-use-runtime-irq-suspend-resume-in-fr.patch --]
[-- Type: text/x-diff, Size: 2153 bytes --]

>From b9831d771ea7f416f3ab1c992f67c7523f34ecbd Mon Sep 17 00:00:00 2001
From: Klaus Ethgen <Klaus@Ethgen.de>
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

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 648 bytes --]