Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 87bcdd2e authored by Jesse Barnes's avatar Jesse Barnes Committed by Daniel Vetter
Browse files

drm/i915: don't try to load GuC fw on pre-gen9

This avoids some bad register writes and generally feels more correct
than unconditionally trying to redirect interrupts and such.

References: https://bugs.freedesktop.org/show_bug.cgi?id=91777


Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 6ff8ab0d
Loading
Loading
Loading
Loading
+16 −13
Original line number Original line Diff line number Diff line
@@ -4687,6 +4687,7 @@ i915_gem_init_hw(struct drm_device *dev)
	}
	}


	/* We can't enable contexts until all firmware is loaded */
	/* We can't enable contexts until all firmware is loaded */
	if (HAS_GUC_UCODE(dev)) {
		ret = intel_guc_ucode_load(dev);
		ret = intel_guc_ucode_load(dev);
		if (ret) {
		if (ret) {
			/*
			/*
@@ -4696,11 +4697,13 @@ i915_gem_init_hw(struct drm_device *dev)
			 * discard the error and carry on.
			 * discard the error and carry on.
			 */
			 */
			DRM_ERROR("Failed to initialize GuC, error %d%s\n", ret,
			DRM_ERROR("Failed to initialize GuC, error %d%s\n", ret,
			i915.enable_guc_submission ? "" : " (ignored)");
				  i915.enable_guc_submission ? "" :
				  " (ignored)");
			ret = i915.enable_guc_submission ? -EIO : 0;
			ret = i915.enable_guc_submission ? -EIO : 0;
			if (ret)
			if (ret)
				goto out;
				goto out;
		}
		}
	}


	/* Now it is safe to go back round and do everything else: */
	/* Now it is safe to go back round and do everything else: */
	for_each_ring(ring, dev_priv, i) {
	for_each_ring(ring, dev_priv, i) {