Commit 058179e7 authored by Chris Wilson's avatar Chris Wilson
Browse files

drm/i915/gt: Replace hangcheck by heartbeats



Replace sampling the engine state every so often with a periodic
heartbeat request to measure the health of an engine. This is coupled
with the forced-preemption to allow long running requests to survive so
long as they do not block other users.

Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Jon Bloomfield <jon.bloomfield@intel.com>
Reviewed-by: default avatarJon Bloomfield <jon.bloomfield@intel.com>
Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191023133108.21401-5-chris@chris-wilson.co.uk
parent 2e0986a5
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -12,6 +12,17 @@ config DRM_I915_USERFAULT_AUTOSUSPEND
	  May be 0 to disable the extra delay and solely use the device level
	  runtime pm autosuspend delay tunable.

config DRM_I915_HEARTBEAT_INTERVAL
	int "Interval between heartbeat pulses (ms)"
	default 2500 # milliseconds
	help
	  The driver sends a periodic heartbeat down all active engines to
	  check the health of the GPU and undertake regular house-keeping of
	  internal driver state.

	  May be 0 to disable heartbeats and therefore disable automatic GPU
	  hang detection.

config DRM_I915_PREEMPT_TIMEOUT
	int "Preempt timeout (ms, jiffy granularity)"
	default 100 # milliseconds
+0 −1
Original line number Diff line number Diff line
@@ -87,7 +87,6 @@ gt-y += \
	gt/intel_gt_pm.o \
	gt/intel_gt_pm_irq.o \
	gt/intel_gt_requests.o \
	gt/intel_hangcheck.o \
	gt/intel_llc.o \
	gt/intel_lrc.o \
	gt/intel_rc6.o \
+1 −1
Original line number Diff line number Diff line
@@ -14863,7 +14863,7 @@ static void intel_plane_unpin_fb(struct intel_plane_state *old_plane_state)
static void fb_obj_bump_render_priority(struct drm_i915_gem_object *obj)
{
	struct i915_sched_attr attr = {
		.priority = I915_PRIORITY_DISPLAY,
		.priority = I915_USER_PRIORITY(I915_PRIORITY_DISPLAY),
	};

	i915_gem_object_wait_priority(obj, 0, &attr);
+0 −1
Original line number Diff line number Diff line
@@ -462,6 +462,5 @@ int i915_gem_object_wait(struct drm_i915_gem_object *obj,
int i915_gem_object_wait_priority(struct drm_i915_gem_object *obj,
				  unsigned int flags,
				  const struct i915_sched_attr *attr);
#define I915_PRIORITY_DISPLAY I915_USER_PRIORITY(I915_PRIORITY_MAX)

#endif
+0 −2
Original line number Diff line number Diff line
@@ -76,8 +76,6 @@ void i915_gem_suspend(struct drm_i915_private *i915)
	intel_gt_suspend(&i915->gt);
	intel_uc_suspend(&i915->gt.uc);

	cancel_delayed_work_sync(&i915->gt.hangcheck.work);

	i915_gem_drain_freed_objects(i915);
}

Loading