[PATCH] drm/i915/guc: Skip enabling GuC submission if the driver is wedged

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If the driver is wedged, we will not be using the GPU. (Userspace will
be told NO!) As we won't be using the GPU until the wedged status is
cleared and the device restarted, we can skip enabling the guc whilst
the driver is terminally wedged, and so avoid trying to use a truly
wedged device.

Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Cc: Mika Kuoppala <mika.kuoppala@xxxxxxxxx>
Cc: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
Cc: Oscar Mateo <oscar.mateo@xxxxxxxxx>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@xxxxxxxxx>
Cc: Michal Wajdeczko <michal.wajdeczko@xxxxxxxxx>
Cc: Arkadiusz Hiler <arkadiusz.hiler@xxxxxxxxx>
---
 drivers/gpu/drm/i915/i915_guc_submission.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_guc_submission.c b/drivers/gpu/drm/i915/i915_guc_submission.c
index b04b46966780..96235024e62c 100644
--- a/drivers/gpu/drm/i915/i915_guc_submission.c
+++ b/drivers/gpu/drm/i915/i915_guc_submission.c
@@ -1213,6 +1213,13 @@ int i915_guc_submission_enable(struct drm_i915_private *dev_priv)
 	enum intel_engine_id id;
 	int err;
 
+	/* Don't start the guc if the driver is wedged - we won't be using
+	 * the gpu anyway until after the wedged status is cleared and we
+	 * do a restrt of the device.
+	 */
+	if (i915_terminally_wedged(&dev_priv->gpu_error))
+		return -EIO;
+
 	if (!client) {
 		client = guc_client_alloc(dev_priv,
 					  INTEL_INFO(dev_priv)->ring_mask,
-- 
2.11.0

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




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux