public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915: Hook into the reboot notifier to cancel outstanding GPU operations
@ 2018-11-25 17:24 Chris Wilson
  2018-11-25 17:24 ` [PATCH 2/2] drm/i915: Disable active links before rebooting Chris Wilson
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Chris Wilson @ 2018-11-25 17:24 UTC (permalink / raw)
  To: intel-gfx

When the system is being shutdown, we no longer care about the results
of outstanding GPU operations, and so we can cancel them to speed up the
reboot. This helps most if we happen to be stuck waiting for a timeout
to declare the GPU hung.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_pci.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
index 1b81d7cb209e..cf2396856d38 100644
--- a/drivers/gpu/drm/i915/i915_pci.c
+++ b/drivers/gpu/drm/i915/i915_pci.c
@@ -763,11 +763,25 @@ static int i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	return 0;
 }
 
+static void i915_pci_shutdown(struct pci_dev *pdev)
+{
+	struct drm_i915_private *i915;
+
+	i915 = pci_get_drvdata(pdev);
+	if (!i915) /* driver load aborted? */
+		return;
+
+	/* Cancel any outstanding rendering */
+	if (READ_ONCE(i915->gt.awake))
+		i915_gem_set_wedged(i915);
+}
+
 static struct pci_driver i915_pci_driver = {
 	.name = DRIVER_NAME,
 	.id_table = pciidlist,
 	.probe = i915_pci_probe,
 	.remove = i915_pci_remove,
+	.shutdown = i915_pci_shutdown,
 	.driver.pm = &i915_pm_ops,
 };
 
-- 
2.19.2

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 8+ messages in thread
* Shutdown hooks
@ 2019-05-15 15:00 Chris Wilson
  2019-05-15 15:00 ` [PATCH 2/2] drm/i915: Disable active links before rebooting Chris Wilson
  0 siblings, 1 reply; 8+ messages in thread
From: Chris Wilson @ 2019-05-15 15:00 UTC (permalink / raw)
  To: intel-gfx; +Cc: janusz.krzysztofik

Janus, some old patches that may be of use for shutdown prior to kexec.
-Chris


_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2019-05-16 10:10 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-25 17:24 [PATCH 1/2] drm/i915: Hook into the reboot notifier to cancel outstanding GPU operations Chris Wilson
2018-11-25 17:24 ` [PATCH 2/2] drm/i915: Disable active links before rebooting Chris Wilson
2018-11-26 12:55   ` Jani Nikula
2018-11-27 13:07     ` Ville Syrjälä
2018-11-26 10:02 ` ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Hook into the reboot notifier to cancel outstanding GPU operations Patchwork
2018-11-26 11:17 ` ✓ Fi.CI.IGT: " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2019-05-15 15:00 Shutdown hooks Chris Wilson
2019-05-15 15:00 ` [PATCH 2/2] drm/i915: Disable active links before rebooting Chris Wilson
2019-05-16 10:13   ` Jani Nikula

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox