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

Commit b1330fbb authored by Chris Wilson's avatar Chris Wilson Committed by Daniel Vetter
Browse files

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: default avatarChris Wilson <chris@chris-wilson.co.uk>
[danvet: Mark i915.reset as an unsafe modoption, as discussed with
Chris.]
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent bf13af56
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -165,7 +165,6 @@ static int i915_getparam(struct drm_device *dev, void *data,
		break;
	case I915_PARAM_HAS_GPU_RESET:
		value = i915.enable_hangcheck &&
			i915.reset &&
			intel_has_gpu_reset(dev);
		break;
	default:
+0 −3
Original line number Diff line number Diff line
@@ -846,9 +846,6 @@ int i915_reset(struct drm_device *dev)
	bool simulated;
	int ret;

	if (!i915.reset)
		return 0;

	intel_reset_gt_powersave(dev);

	mutex_lock(&dev->struct_mutex);
+1 −1
Original line number Diff line number Diff line
@@ -104,7 +104,7 @@ MODULE_PARM_DESC(vbt_sdvo_panel_type,
	"Override/Ignore selection of SDVO panel mode in the VBT "
	"(-2=ignore, -1=auto [default], index in VBT BIOS table)");

module_param_named(reset, i915.reset, bool, 0600);
module_param_named_unsafe(reset, i915.reset, bool, 0600);
MODULE_PARM_DESC(reset, "Attempt GPU resets (default: true)");

module_param_named(enable_hangcheck, i915.enable_hangcheck, bool, 0644);
+3 −0
Original line number Diff line number Diff line
@@ -1496,6 +1496,9 @@ static int gen8_do_reset(struct drm_device *dev)

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)