drm/i915: Avoid sleeping inside per-engine reset
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 29 Mar 2018 22:45:18 +0000 (23:45 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 30 Mar 2018 09:05:59 +0000 (10:05 +0100)
commit5807e1c21dbd56c87f0e86ae6fe49ec745660c0d
tree7b7ca68eb59f19da3bedf317323bdb7a6ebf32cf
parent9bd9be666008499bb9071e9e5472ded24e522f0b
drm/i915: Avoid sleeping inside per-engine reset

Only sleep and repeat when asked for a full device reset (ALL_ENGINES)
and avoid using sleeping waits when asked for a per-engine reset. The
goal is to be able to use a per-engine reset from hardirq/softirq/timer
context. A consequence is that our individual wait timeouts are a
thousand times shorter, on the order of a hundred microseconds rather
than hundreds of millisecond. This may make hitting the timeouts more
common, but hopefully the fallover to the full-device reset will be
sufficient to pick up the pieces.

Note, that the sleeps inside older gen (pre-gen8) have been left as they
are only used in full device reset mode.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: MichaƂ Winiarski <michal.winiarski@intel.com>
CC: Michel Thierry <michel.thierry@intel.com>
Cc: Jeff McGee <jeff.mcgee@intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Michel Thierry <michel.thierry@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180329224519.13598-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/intel_uncore.c