summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/i915_gem.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2019-01-04 00:33:40 +0300
committerChris Wilson <chris@chris-wilson.co.uk>2019-01-04 12:06:00 +0300
commit55c15512a9cf6e287883ca826a4671a26f4f2afc (patch)
tree0ed6498cbb818c061e768e18f2b0262306d1a811 /drivers/gpu/drm/i915/i915_gem.c
parent55277e1f3107c0b7f18aaa1572ab97081ccde57a (diff)
downloadlinux-55c15512a9cf6e287883ca826a4671a26f4f2afc.tar.xz
drm/i915: Do not allow unwedging following a failed driver initialisation
If we declare the driver wedged during early initialisation, we leave the driver in an undefined state (with respect to GEM execution). As this leads to unexpected behaviour if we allow the user to unwedge the device (through debugfs, and performed by igt at test start), do not. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190103213340.1669-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 4b1656d2482e..60019e9291ce 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3380,6 +3380,9 @@ bool i915_gem_unset_wedged(struct drm_i915_private *i915)
if (!test_bit(I915_WEDGED, &i915->gpu_error.flags))
return true;
+ if (!i915->gt.scratch) /* Never full initialised, recovery impossible */
+ return false;
+
GEM_TRACE("start\n");
/*