]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gt: Only drop heartbeat.systole if the sole owner
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 6 Nov 2019 13:31:29 +0000 (13:31 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 6 Nov 2019 15:45:53 +0000 (15:45 +0000)
commitab6a9998ed1c280dffcb0e3a350ad7b3a966d512
tree3acf4c1199581a0e794c3fcacb6564444ea05494
parent3ccb83591220fa60810c4bfb9b4c98b5eac49507
drm/i915/gt: Only drop heartbeat.systole if the sole owner

Mika spotted that only using cancel_delayed_work() could mean that we
attempted to clear the heartbeat.systole while the worker was still
running. Rectify the situation by only touching the systole from outside
the worker if we suceeded in cancelling the worker before it could run.
The worker is expected to clean up by itself upon idling.

Reported-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Fixes: 174a8144861d ("drm/i915/gt: Replace hangcheck by heartbeats")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191106133129.17732-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c