summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_uncore.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2015-06-18 11:42:08 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-06-23 14:01:38 +0200
commitb1330fbb870467bbb90adb2e8868672af4ca88c7 (patch)
tree26dade4170a4b26bb8a114791676c78b0e8fc0f9 /drivers/gpu/drm/i915/intel_uncore.c
parentbf13af56252b2b4f50eb6fc8638e8cb9e84ff475 (diff)
downloadlinux-b1330fbb870467bbb90adb2e8868672af4ca88c7.tar.bz2
drm/i915: Report an error when i915.reset prevents a reset
If the user disables the GPU reset using the i915.reset parameter and one occurs, report that we failed to reset the GPU. If we return early, as we currently do, then we leave all state intact (with a hung GPU) and clients block forever waiting for their requests to complete. Testcase: igt/gem_eio Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> [danvet: Mark i915.reset as an unsafe modoption, as discussed with Chris.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_uncore.c')
-rw-r--r--drivers/gpu/drm/i915/intel_uncore.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
index 160a47a9bdd9..45285a9178fe 100644
--- a/drivers/gpu/drm/i915/intel_uncore.c
+++ b/drivers/gpu/drm/i915/intel_uncore.c
@@ -1496,6 +1496,9 @@ not_ready:
static int (*intel_get_gpu_reset(struct drm_device *dev))(struct drm_device *)
{
+ if (!i915.reset)
+ return NULL;
+
if (INTEL_INFO(dev)->gen >= 8)
return gen8_do_reset;
else if (INTEL_INFO(dev)->gen >= 6)