OSDN Git Service

drm/i915: clarify concurrent hang detect/gpu reset consistency
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 6 Dec 2012 15:23:37 +0000 (16:23 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 21 Jan 2013 19:14:59 +0000 (20:14 +0100)
commit7db0ba242b3a7ddcfc1450bc50eb3102c68f0244
treeba81f75c7f1906dc9e3bae130a33cc4fb007a2cb
parentf69061bedd6ea63f271fe97914364def2f33fc6b
drm/i915: clarify concurrent hang detect/gpu reset consistency

Damien Lespiau wondered how race the gpu reset/hang detection code is
against concurrent gpu resets/hang detections or combinations thereof.
Luckily the single work item is guranteed to never run concurrently,
so reset handling is already single-threaded.

Hence we only have to worry about concurrent hang detections, or a
hang detection firing off while we're still processing an older gpu
reset request. Due to the new mechanism of setting the reset in
progress flag and the ordering guaranteed by the schedule_work
function there's nothing to do but add a comment explaining why we're
safe.

The only thing I've noticed is that we still try to reset the gpu now,
even when it is declared terminally wedged. Add a check for that to
avoid continous warnings about failed resets, in case the hangcheck
timer ever gets stuck.

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_irq.c