[PATCH 059/109] drm/i915: Disable active links before rebooting

Chris Wilson chris at chris-wilson.co.uk
Wed Jan 2 16:47:16 UTC 2019


Certain monitors, e.g. Dell, do not like it when we reboot with an
active link, leaving them in a confused state where they refuse to
renegotiate the link after the reboot. If we hook into the reboot
notifier, we can switch off any active link before rebooting, leaving
everything in a consistent, hopefully happy, state.

Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 drivers/gpu/drm/i915/i915_pci.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
index aa02f5bb877f..5db464795b07 100644
--- a/drivers/gpu/drm/i915/i915_pci.c
+++ b/drivers/gpu/drm/i915/i915_pci.c
@@ -26,6 +26,8 @@
 #include <linux/vgaarb.h>
 #include <linux/vga_switcheroo.h>
 
+#include <drm/drm_atomic_helper.h>
+
 #include "i915_drv.h"
 #include "i915_selftest.h"
 
@@ -789,6 +791,9 @@ static void i915_pci_shutdown(struct pci_dev *pdev)
 	/* Cancel any outstanding rendering */
 	if (READ_ONCE(i915->gt.awake))
 		i915_gem_set_wedged(i915);
+
+	/* Disable active links to avoid confusing certain (Dell) monitors */
+	drm_atomic_helper_shutdown(&i915->drm);
 }
 
 static struct pci_driver i915_pci_driver = {
-- 
2.20.1



More information about the Intel-gfx-trybot mailing list