Skip to contentSkip to conversation

drm/i915: gen4: work around hang during hibernation

PATCH Applied Imre Deak 6 participants 8 messages Mar 2, 2015 – Mar 18, 2015

Subsystems (2)
lore
Share & tools
lore

Imre Deak

author
#0 lore raw

PATCH v2 1/1 drm/i915: gen4: work around hang during hibernation

Bjørn reported that his machine hang during hibernation and eventually bisected the problem to the following commit:

commit da2bc1b9db3351addd293e5b82757efe1f77ed1d

Author: Imre Deak <[email protected]>
Date:   Thu Oct 23 19:23:26 2014 +0300

drm/i915: add poweroff_late handler

The problem seems to be that after the kernel puts the device into D3 the BIOS still tries to access it, or otherwise assumes that it's in D0. This is clearly bogus, since ACPI mandates that devices are put into D3 by the OSPM if they are not wake-up sources. In the future we want to unify more of the driver's runtime and system suspend paths, for example by skipping all the system suspend/hibernation hooks if the device is runtime suspended already. Accordingly for all other platforms the goal is still to properly power down the device during hibernation.

v2:
- Another GEN4 Lenovo laptop had the same issue, while platforms from other vendors (including mobile and desktop, GEN4 and non-GEN4) seem to work fine. Based on this apply the workaround on all GEN4 Lenovo platforms.
- add code comment about failing platforms (Ville)

Reference: http://lists.freedesktop.org/archives/intel-gfx/2015-February/060633.html

---
 drivers/gpu/drm/i915/i915_drv.c | 30 +++++++++++++++++++++++++-----
 1 file changed, 25 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +25 -5
index 4badb23..ff3662f 100644
@@ -637,7 +637,7 @@ static int i915_drm_suspend(struct drm_device *dev)
 	return 0;
 }
 
-static int i915_drm_suspend_late(struct drm_device *drm_dev)
+static int i915_drm_suspend_late(struct drm_device *drm_dev, bool hibernation)
 {
 	struct drm_i915_private *dev_priv = drm_dev->dev_private;
 	int ret;
@@ -651,7 +651,17 @@ static int i915_drm_suspend_late(struct drm_device *drm_dev)
 	}
 
 	pci_disable_device(drm_dev->pdev);
-	pci_set_power_state(drm_dev->pdev, PCI_D3hot);
+	/*
+	 * During hibernation on some GEN4 platforms the BIOS may try to access
+	 * the device even though it's already in D3 and hang the machine. So
+	 * leave the device in D0 on those platforms and hope the BIOS will
+	 * power down the device properly. Platforms where this was seen:
+	 * Lenovo Thinkpad X301, X61s
+	 */
+	if (!(hibernation &&
+	      drm_dev->pdev->subsystem_vendor == PCI_VENDOR_ID_LENOVO &&
+	      INTEL_INFO(dev_priv)->gen == 4))
+		pci_set_power_state(drm_dev->pdev, PCI_D3hot);
 
 	return 0;
 }
@@ -677,7 +687,7 @@ int i915_suspend_legacy(struct drm_device *dev, pm_message_t state)
 	if (error)
 		return error;
 
-	return i915_drm_suspend_late(dev);
+	return i915_drm_suspend_late(dev, false);
 }
 
 static int i915_drm_resume(struct drm_device *dev)
@@ -965,7 +975,17 @@ static int i915_pm_suspend_late(struct device *dev)
 	if (drm_dev->switch_power_state == DRM_SWITCH_POWER_OFF)
 		return 0;
 
-	return i915_drm_suspend_late(drm_dev);
+	return i915_drm_suspend_late(drm_dev, false);
+}
+
+static int i915_pm_poweroff_late(struct device *dev)
+{
+	struct drm_device *drm_dev = dev_to_i915(dev)->dev;
+
+	if (drm_dev->switch_power_state == DRM_SWITCH_POWER_OFF)
+		return 0;
+
+	return i915_drm_suspend_late(drm_dev, true);
 }
 
 static int i915_pm_resume_early(struct device *dev)
@@ -1535,7 +1555,7 @@ static const struct dev_pm_ops i915_pm_ops = {
 	.thaw_early = i915_pm_resume_early,
 	.thaw = i915_pm_resume,
 	.poweroff = i915_pm_suspend,
-	.poweroff_late = i915_pm_suspend_late,
+	.poweroff_late = i915_pm_poweroff_late,
 	.restore_early = i915_pm_resume_early,
 	.restore = i915_pm_resume,
 
Signature · 6 lines
2.1.0

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw
Quoted 25 lines · Imre Deak

Bjørn reported that his machine hang during hibernation and eventually bisected the problem to the following commit:

commit da2bc1b9db3351addd293e5b82757efe1f77ed1d

Author: Imre Deak <[email protected]>
Date:   Thu Oct 23 19:23:26 2014 +0300

drm/i915: add poweroff_late handler

The problem seems to be that after the kernel puts the device into D3 the BIOS still tries to access it, or otherwise assumes that it's in D0. This is clearly bogus, since ACPI mandates that devices are put into D3 by the OSPM if they are not wake-up sources. In the future we want to unify more of the driver's runtime and system suspend paths, for example by skipping all the system suspend/hibernation hooks if the device is runtime suspended already. Accordingly for all other platforms the goal is still to properly power down the device during hibernation.

v2:
- Another GEN4 Lenovo laptop had the same issue, while platforms from other vendors (including mobile and desktop, GEN4 and non-GEN4) seem to work fine. Based on this apply the workaround on all GEN4 Lenovo platforms.
- add code comment about failing platforms (Ville)

Quoted 3 lines

Reference: http://lists.freedesktop.org/archives/intel-gfx/2015-February/060633.html

Bjørn, I would really appreciate your Tested-by on this patch before I queue it for v4.0 and cc: stable for v3.19.

BR,
Jani.

Quoted 76 lines
---
 drivers/gpu/drm/i915/i915_drv.c | 30 +++++++++++++++++++++++++-----
 1 file changed, 25 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +25 -5
index 4badb23..ff3662f 100644
@@ -637,7 +637,7 @@ static int i915_drm_suspend(struct drm_device *dev)
 	return 0;
 }
 
-static int i915_drm_suspend_late(struct drm_device *drm_dev)
+static int i915_drm_suspend_late(struct drm_device *drm_dev, bool hibernation)
 {
 	struct drm_i915_private *dev_priv = drm_dev->dev_private;
 	int ret;
@@ -651,7 +651,17 @@ static int i915_drm_suspend_late(struct drm_device *drm_dev)
 	}
 
 	pci_disable_device(drm_dev->pdev);
-	pci_set_power_state(drm_dev->pdev, PCI_D3hot);
+	/*
+	 * During hibernation on some GEN4 platforms the BIOS may try to access
+	 * the device even though it's already in D3 and hang the machine. So
+	 * leave the device in D0 on those platforms and hope the BIOS will
+	 * power down the device properly. Platforms where this was seen:
+	 * Lenovo Thinkpad X301, X61s
+	 */
+	if (!(hibernation &&
+	      drm_dev->pdev->subsystem_vendor == PCI_VENDOR_ID_LENOVO &&
+	      INTEL_INFO(dev_priv)->gen == 4))
+		pci_set_power_state(drm_dev->pdev, PCI_D3hot);
 
 	return 0;
 }
@@ -677,7 +687,7 @@ int i915_suspend_legacy(struct drm_device *dev, pm_message_t state)
 	if (error)
 		return error;
 
-	return i915_drm_suspend_late(dev);
+	return i915_drm_suspend_late(dev, false);
 }
 
 static int i915_drm_resume(struct drm_device *dev)
@@ -965,7 +975,17 @@ static int i915_pm_suspend_late(struct device *dev)
 	if (drm_dev->switch_power_state == DRM_SWITCH_POWER_OFF)
 		return 0;
 
-	return i915_drm_suspend_late(drm_dev);
+	return i915_drm_suspend_late(drm_dev, false);
+}
+
+static int i915_pm_poweroff_late(struct device *dev)
+{
+	struct drm_device *drm_dev = dev_to_i915(dev)->dev;
+
+	if (drm_dev->switch_power_state == DRM_SWITCH_POWER_OFF)
+		return 0;
+
+	return i915_drm_suspend_late(drm_dev, true);
 }
 
 static int i915_pm_resume_early(struct device *dev)
@@ -1535,7 +1555,7 @@ static const struct dev_pm_ops i915_pm_ops = {
 	.thaw_early = i915_pm_resume_early,
 	.thaw = i915_pm_resume,
 	.poweroff = i915_pm_suspend,
-	.poweroff_late = i915_pm_suspend_late,
+	.poweroff_late = i915_pm_poweroff_late,
 	.restore_early = i915_pm_resume_early,
 	.restore = i915_pm_resume,
 
Signature · 1 line
2.1.0
Signature · 1 line
Jani Nikula, Intel Open Source Technology Center
Tested-by
#2 lore raw
Quoted 26 lines · Jani Nikula
Quoted 25 lines · Imre Deak

Bjørn reported that his machine hang during hibernation and eventually bisected the problem to the following commit:

commit da2bc1b9db3351addd293e5b82757efe1f77ed1d

Author: Imre Deak <[email protected]>
Date:   Thu Oct 23 19:23:26 2014 +0300

drm/i915: add poweroff_late handler

The problem seems to be that after the kernel puts the device into D3 the BIOS still tries to access it, or otherwise assumes that it's in D0. This is clearly bogus, since ACPI mandates that devices are put into D3 by the OSPM if they are not wake-up sources. In the future we want to unify more of the driver's runtime and system suspend paths, for example by skipping all the system suspend/hibernation hooks if the device is runtime suspended already. Accordingly for all other platforms the goal is still to properly power down the device during hibernation.

v2:
- Another GEN4 Lenovo laptop had the same issue, while platforms from other vendors (including mobile and desktop, GEN4 and non-GEN4) seem to work fine. Based on this apply the workaround on all GEN4 Lenovo platforms.
- add code comment about failing platforms (Ville)

Quoted 6 lines
Quoted 3 lines

Reference: http://lists.freedesktop.org/archives/intel-gfx/2015-February/060633.html

Bjørn, I would really appreciate your Tested-by on this patch before I queue it for v4.0 and cc: stable for v3.19.

No problem. This version still works fine for me. Feel free to add

Bjørn
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Applied
#3 lore raw
Quoted 32 lines · Bjørn Mork
Quoted 30 lines · Jani Nikula
Quoted 28 lines · Imre Deak

Bjørn reported that his machine hang during hibernation and eventually bisected the problem to the following commit:

commit da2bc1b9db3351addd293e5b82757efe1f77ed1d

Author: Imre Deak <[email protected]>
Date:   Thu Oct 23 19:23:26 2014 +0300

drm/i915: add poweroff_late handler

The problem seems to be that after the kernel puts the device into D3 the BIOS still tries to access it, or otherwise assumes that it's in D0. This is clearly bogus, since ACPI mandates that devices are put into D3 by the OSPM if they are not wake-up sources. In the future we want to unify more of the driver's runtime and system suspend paths, for example by skipping all the system suspend/hibernation hooks if the device is runtime suspended already. Accordingly for all other platforms the goal is still to properly power down the device during hibernation.

v2:
- Another GEN4 Lenovo laptop had the same issue, while platforms from other vendors (including mobile and desktop, GEN4 and non-GEN4) seem to work fine. Based on this apply the workaround on all GEN4 Lenovo platforms.
- add code comment about failing platforms (Ville)

Reference: http://lists.freedesktop.org/archives/intel-gfx/2015-February/060633.html

Quoted 6 lines
Quoted 2 lines

Bjørn, I would really appreciate your Tested-by on this patch before I queue it for v4.0 and cc: stable for v3.19.

No problem. This version still works fine for me. Feel free to add

Pushed to drm-intel-fixes with Daniel's IRC ack. Thanks for the patch and testing.

BR,
Jani.

Quoted 4 lines

Bjørn

Signature · 1 line
Jani Nikula, Intel Open Source Technology Center
Tested-by on v2 1/1
#4 lore raw
In reply to Imre Deak

Task id: 5868 -------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied
PNV -5 278/278 273/278
ILK 308/308 308/308
SNB -1 284/284 283/284

IVB                                  380/380              380/380
BYT                                  294/294              294/294
HSW                                  387/387              387/387
BDW                 -1              316/316              315/316
-------------------------------------Detailed-------------------------------------
Platform  Test                                drm-intel-nightly          Series Applied
 PNV  igt_gem_userptr_blits_coherency-sync      CRASH(4)PASS(7)      CRASH(1)PASS(1)
 PNV  igt_gem_userptr_blits_coherency-unsync      NO_RESULT(1)CRASH(3)PASS(5)      CRASH(1)PASS(1)
 PNV  igt_gen3_render_linear_blits      FAIL(3)PASS(7)      FAIL(2)
 PNV  igt_gen3_render_mixed_blits      FAIL(3)PASS(9)      FAIL(2)
 PNV  igt_gem_fence_thrash_bo-write-verify-threaded-none      FAIL(2)CRASH(2)PASS(3)      CRASH(2)
*SNB  igt_gem_flink_basic      PASS(2)      DMESG_WARN(1)PASS(1)
*BDW  igt_gem_gtt_hog      PASS(12)      DMESG_WARN(1)PASS(1)

Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

#5 lore raw
In reply to Imre Deak

Imre Deak schreef op ma 02-03-2015 om 13:04 [+0200]:

Quoted 18 lines

Bjørn reported that his machine hang during hibernation and eventually bisected the problem to the following commit:

commit da2bc1b9db3351addd293e5b82757efe1f77ed1d

Author: Imre Deak <[email protected]>
Date:   Thu Oct 23 19:23:26 2014 +0300

drm/i915: add poweroff_late handler

The problem seems to be that after the kernel puts the device into D3 the BIOS still tries to access it, or otherwise assumes that it's in D0. This is clearly bogus, since ACPI mandates that devices are put into D3 by the OSPM if they are not wake-up sources. In the future we want to unify more of the driver's runtime and system suspend paths, for example by skipping all the system suspend/hibernation hooks if the device is runtime suspended already. Accordingly for all other platforms the goal is still to properly power down the device during hibernation.

Quoted 6 lines

v2:
- Another GEN4 Lenovo laptop had the same issue, while platforms from other vendors (including mobile and desktop, GEN4 and non-GEN4) seem to work fine. Based on this apply the workaround on all GEN4 Lenovo platforms.
- add code comment about failing platforms (Ville)

The outdated ThinkPad X41 that I torture by running rc's showed identical symptoms, also since v3.19-rc1. It uses a gen3 chipset (it has a 915GM, I think, but I keep forgetting details like that).

I did everything wrong to get this fixed (1: hope this gets magically fixed; 2: bisect it myself, thinking every now and then that I know better than git bisect which commit to choose; 3: finally grep lkml). So here I am late to the show.

Quoted 29 lines

Reference: http://lists.freedesktop.org/archives/intel-gfx/2015-February/060633.html

---
 drivers/gpu/drm/i915/i915_drv.c | 30 +++++++++++++++++++++++++-----
 1 file changed, 25 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +5 -2
index 4badb23..ff3662f 100644
@@ -637,7 +637,7 @@ static int i915_drm_suspend(struct drm_device *dev)
 	return 0;
 }
 
-static int i915_drm_suspend_late(struct drm_device *drm_dev)
+static int i915_drm_suspend_late(struct drm_device *drm_dev, bool hibernation)
 {
 	struct drm_i915_private *dev_priv = drm_dev->dev_private;
 	int ret;
@@ -651,7 +651,17 @@ static int i915_drm_suspend_late(struct drm_device *drm_dev)
 	}
 
 	pci_disable_device(drm_dev->pdev);
-	pci_set_power_state(drm_dev->pdev, PCI_D3hot);
+	/*
+	 * During hibernation on some GEN4 platforms the BIOS may try to access
+	 * the device even though it's already in D3 and hang the machine. So
+	 * leave the device in D0 on those platforms and hope the BIOS will

drivers/gpu/drm/i915/i915_drv.c static int i915_drm_suspend_late(struct drm_device *drm_dev) · line 667

Quoted 10 lines
drivers/gpu/drm/i915/i915_drv.c +7 -0
+	 * power down the device properly. Platforms where this was seen:
+	 * Lenovo Thinkpad X301, X61s
+	 */
+	if (!(hibernation &&
+	      drm_dev->pdev->subsystem_vendor == PCI_VENDOR_ID_LENOVO &&
+	      INTEL_INFO(dev_priv)->gen == 4))
+		pci_set_power_state(drm_dev->pdev, PCI_D3hot);
 
 	return 0;
 }

I'll paste a DRAFT patch that fixes this for that X41 at the end of the message. The patch is rather ugly. Should we perhaps try a quirk table or something like that?

Paul Bolle

-------->8--------
Subject: [PATCH] drm/i915: work around hang during hibernation on gen3 too

Commit ab3be73fa7b4 ("drm/i915: gen4: work around hang during hibernation") was targetted at gen4 platforms shipped by Lenovo. The same problem can also be seen on a Lenovo ThinkPad X41. Expand the test to catch that system too.

Sadly, this system still uses IBM's subsystem vendor id. So we end up with a rather unpleasant test. Use the IS_GEN3() and IS_GEN4() macros to lessen the pain a bit.

Not-yet-signed-off-by Paul Bolle <[email protected]>
---
 drivers/gpu/drm/i915/i915_drv.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +4 -3
index cc6ea53d2b81..3a07164f5860 100644
@@ -641,11 +641,12 @@ static int i915_drm_suspend_late(struct drm_device *drm_dev, bool hibernation)
 	 * the device even though it's already in D3 and hang the machine. So
 	 * leave the device in D0 on those platforms and hope the BIOS will
 	 * power down the device properly. Platforms where this was seen:
-	 * Lenovo Thinkpad X301, X61s
+	 * Lenovo Thinkpad X301, X61s, X41
 	 */
 	if (!(hibernation &&
-	      drm_dev->pdev->subsystem_vendor == PCI_VENDOR_ID_LENOVO &&
-	      INTEL_INFO(dev_priv)->gen == 4))
+	      (drm_dev->pdev->subsystem_vendor == PCI_VENDOR_ID_LENOVO ||
+	       drm_dev->pdev->subsystem_vendor == PCI_SUBVENDOR_ID_IBM) &&
+	      (IS_GEN3(dev_priv) || IS_GEN4(dev_priv))))
 		pci_set_power_state(drm_dev->pdev, PCI_D3hot);
 
 	return 0;
Signature · 6 lines
2.1.0

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
#6 lore raw
Quoted 85 lines · Paul Bolle

Imre Deak schreef op ma 02-03-2015 om 13:04 [+0200]:

Quoted 18 lines

Bjørn reported that his machine hang during hibernation and eventually bisected the problem to the following commit:

commit da2bc1b9db3351addd293e5b82757efe1f77ed1d

Author: Imre Deak <[email protected]>
Date:   Thu Oct 23 19:23:26 2014 +0300

drm/i915: add poweroff_late handler

The problem seems to be that after the kernel puts the device into D3 the BIOS still tries to access it, or otherwise assumes that it's in D0. This is clearly bogus, since ACPI mandates that devices are put into D3 by the OSPM if they are not wake-up sources. In the future we want to unify more of the driver's runtime and system suspend paths, for example by skipping all the system suspend/hibernation hooks if the device is runtime suspended already. Accordingly for all other platforms the goal is still to properly power down the device during hibernation.

Quoted 6 lines

v2:
- Another GEN4 Lenovo laptop had the same issue, while platforms from other vendors (including mobile and desktop, GEN4 and non-GEN4) seem to work fine. Based on this apply the workaround on all GEN4 Lenovo platforms.
- add code comment about failing platforms (Ville)

The outdated ThinkPad X41 that I torture by running rc's showed identical symptoms, also since v3.19-rc1. It uses a gen3 chipset (it has a 915GM, I think, but I keep forgetting details like that).

I did everything wrong to get this fixed (1: hope this gets magically fixed; 2: bisect it myself, thinking every now and then that I know better than git bisect which commit to choose; 3: finally grep lkml). So here I am late to the show.

Quoted 29 lines

Reference: http://lists.freedesktop.org/archives/intel-gfx/2015-February/060633.html

---
 drivers/gpu/drm/i915/i915_drv.c | 30 +++++++++++++++++++++++++-----
 1 file changed, 25 insertions(+), 5 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +5 -2
index 4badb23..ff3662f 100644
@@ -637,7 +637,7 @@ static int i915_drm_suspend(struct drm_device *dev)
 	return 0;
 }
 
-static int i915_drm_suspend_late(struct drm_device *drm_dev)
+static int i915_drm_suspend_late(struct drm_device *drm_dev, bool hibernation)
 {
 	struct drm_i915_private *dev_priv = drm_dev->dev_private;
 	int ret;
@@ -651,7 +651,17 @@ static int i915_drm_suspend_late(struct drm_device *drm_dev)
 	}
 
 	pci_disable_device(drm_dev->pdev);
-	pci_set_power_state(drm_dev->pdev, PCI_D3hot);
+	/*
+	 * During hibernation on some GEN4 platforms the BIOS may try to access
+	 * the device even though it's already in D3 and hang the machine. So
+	 * leave the device in D0 on those platforms and hope the BIOS will

drivers/gpu/drm/i915/i915_drv.c static int i915_drm_suspend_late(struct drm_device *drm_dev) · line 667

Quoted 10 lines
drivers/gpu/drm/i915/i915_drv.c +7 -0
+	 * power down the device properly. Platforms where this was seen:
+	 * Lenovo Thinkpad X301, X61s
+	 */
+	if (!(hibernation &&
+	      drm_dev->pdev->subsystem_vendor == PCI_VENDOR_ID_LENOVO &&
+	      INTEL_INFO(dev_priv)->gen == 4))
+		pci_set_power_state(drm_dev->pdev, PCI_D3hot);
 
 	return 0;
 }

I'll paste a DRAFT patch that fixes this for that X41 at the end of the message. The patch is rather ugly. Should we perhaps try a quirk table or something like that?

Paul Bolle

-------->8--------
Subject: [PATCH] drm/i915: work around hang during hibernation on gen3 too

Quoted 8 lines

Commit ab3be73fa7b4 ("drm/i915: gen4: work around hang during hibernation") was targetted at gen4 platforms shipped by Lenovo. The same problem can also be seen on a Lenovo ThinkPad X41. Expand the test to catch that system too.

Sadly, this system still uses IBM's subsystem vendor id. So we end up with a rather unpleasant test. Use the IS_GEN3() and IS_GEN4() macros to lessen the pain a bit.

We had another bug report which showed similar problems on something as recent as SNB:
https://bugzilla.kernel.org/show_bug.cgi?id=94241
So I guess we really want to make the check 'gen < 7'.

My IVB X1 Carbon doesn't need this quirk, so hopefully that indicates the Lenovo BIOSen became more sane for gen7+.

Quoted 28 lines
Not-yet-signed-off-by Paul Bolle <[email protected]>
---
 drivers/gpu/drm/i915/i915_drv.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/i915_drv.c +4 -3
index cc6ea53d2b81..3a07164f5860 100644
@@ -641,11 +641,12 @@ static int i915_drm_suspend_late(struct drm_device *drm_dev, bool hibernation)
 	 * the device even though it's already in D3 and hang the machine. So
 	 * leave the device in D0 on those platforms and hope the BIOS will
 	 * power down the device properly. Platforms where this was seen:
-	 * Lenovo Thinkpad X301, X61s
+	 * Lenovo Thinkpad X301, X61s, X41
 	 */
 	if (!(hibernation &&
-	      drm_dev->pdev->subsystem_vendor == PCI_VENDOR_ID_LENOVO &&
-	      INTEL_INFO(dev_priv)->gen == 4))
+	      (drm_dev->pdev->subsystem_vendor == PCI_VENDOR_ID_LENOVO ||
+	       drm_dev->pdev->subsystem_vendor == PCI_SUBVENDOR_ID_IBM) &&
+	      (IS_GEN3(dev_priv) || IS_GEN4(dev_priv))))
 		pci_set_power_state(drm_dev->pdev, PCI_D3hot);
 
 	return 0;
Signature · 1 line
2.1.0
Signature · 6 lines
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#7 lore raw
Quoted 7 lines · Ville Syrjälä

We had another bug report which showed similar problems on something as recent as SNB:
https://bugzilla.kernel.org/show_bug.cgi?id=94241
So I guess we really want to make the check 'gen < 7'.

My IVB X1 Carbon doesn't need this quirk, so hopefully that indicates the Lenovo BIOSen became more sane for gen7+.

On the other hand my ThinkPad X220 has vendor:device ids 8086:0126, which makes it a gen6 device (assuming I parsed the various preprocessor defines in include/drm/i915_pciids.h and drivers/gpu/drm/i915/i915_drv.c correctly). That laptop is now running v3.19.1 and never hit this issue.

Paul Bolle

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel