diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2019-12-29 19:31:49 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-12-30 15:04:57 +0100 |
commit | 45b152f752ea81935ff1f68d28b1914b8cfbe759 (patch) | |
tree | 9b5e35cf78d697d57f40d98fb49695128f211ca7 /drivers/gpu/drm/i915/gt/intel_gt_pm.c | |
parent | drm/i915/gt: Avoid using tag 0 for the very first submission (diff) | |
download | linux-45b152f752ea81935ff1f68d28b1914b8cfbe759.tar.xz linux-45b152f752ea81935ff1f68d28b1914b8cfbe759.zip |
drm/i915/gt: Avoid using the GPU before initialisation
Mark the GT as wedged so that we are not tempted to use it prior to
initialisation.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Andi Shyti <andi.shyti@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191229183153.3719869-3-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/gt/intel_gt_pm.c')
-rw-r--r-- | drivers/gpu/drm/i915/gt/intel_gt_pm.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/gt/intel_gt_pm.c b/drivers/gpu/drm/i915/gt/intel_gt_pm.c index 3cda837d64c9..9b220c930ebc 100644 --- a/drivers/gpu/drm/i915/gt/intel_gt_pm.c +++ b/drivers/gpu/drm/i915/gt/intel_gt_pm.c @@ -179,7 +179,7 @@ int intel_gt_resume(struct intel_gt *gt) enum intel_engine_id id; int err; - err = intel_gt_terminally_wedged(gt); + err = intel_gt_has_init_error(gt); if (err) return err; @@ -196,6 +196,10 @@ int intel_gt_resume(struct intel_gt *gt) intel_uncore_forcewake_get(gt->uncore, FORCEWAKE_ALL); intel_rc6_sanitize(>->rc6); gt_sanitize(gt, true); + if (intel_gt_is_wedged(gt)) { + err = -EIO; + goto out_fw; + } /* Only when the HW is re-initialised, can we replay the requests */ err = intel_gt_init_hw(gt); |