Skip to content

Commit 87bcdd2

Browse files
jbarnes993danvet
authored andcommitted
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: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
1 parent 6ff8ab0 commit 87bcdd2

1 file changed

Lines changed: 16 additions & 13 deletions

File tree

‎drivers/gpu/drm/i915/i915_gem.c‎

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4687,19 +4687,22 @@ i915_gem_init_hw(struct drm_device *dev)
46874687
}
46884688

46894689
/* We can't enable contexts until all firmware is loaded */
4690-
ret = intel_guc_ucode_load(dev);
4691-
if (ret) {
4692-
/*
4693-
* If we got an error and GuC submission is enabled, map
4694-
* the error to -EIO so the GPU will be declared wedged.
4695-
* OTOH, if we didn't intend to use the GuC anyway, just
4696-
* discard the error and carry on.
4697-
*/
4698-
DRM_ERROR("Failed to initialize GuC, error %d%s\n", ret,
4699-
i915.enable_guc_submission ? "" : " (ignored)");
4700-
ret = i915.enable_guc_submission ? -EIO : 0;
4701-
if (ret)
4702-
goto out;
4690+
if (HAS_GUC_UCODE(dev)) {
4691+
ret = intel_guc_ucode_load(dev);
4692+
if (ret) {
4693+
/*
4694+
* If we got an error and GuC submission is enabled, map
4695+
* the error to -EIO so the GPU will be declared wedged.
4696+
* OTOH, if we didn't intend to use the GuC anyway, just
4697+
* discard the error and carry on.
4698+
*/
4699+
DRM_ERROR("Failed to initialize GuC, error %d%s\n", ret,
4700+
i915.enable_guc_submission ? "" :
4701+
" (ignored)");
4702+
ret = i915.enable_guc_submission ? -EIO : 0;
4703+
if (ret)
4704+
goto out;
4705+
}
47034706
}
47044707

47054708
/* Now it is safe to go back round and do everything else: */

0 commit comments

Comments
 (0)