]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Cancel retire_worker on parking
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 7 May 2019 12:11:07 +0000 (13:11 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 7 May 2019 16:40:19 +0000 (17:40 +0100)
commit55ae089e651ca670438ffdb783f4efa0ddd2522e
tree8a27e5a7c46cdd38ce4ff1f01b072fa81e815dfd
parente89a507571b296de755405a23f6574e9bb6d768d
drm/i915: Cancel retire_worker on parking

Replace the racy continuation check within retire_work with a definite
kill-switch on idling. The race was being exposed by gem_concurrent_blit
where the retire_worker would be terminated too early leaving us
spinning in debugfs/i915_drop_caches with nothing flushing the
retirement queue.

Although that the igt is trying to idle from one child while submitting
from another may be a contributing factor as to why  it runs so slowly...

v2: Use the non-sync version of cancel_delayed_work(), we only need to
stop it from being scheduled as we independently check whether now is
the right time to be parking.

Testcase: igt/gem_concurrent_blit
Fixes: f827242ed4f1 ("drm/i915: Invert the GEM wakeref hierarchy")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190507121108.18377-3-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem_pm.c
drivers/gpu/drm/i915/selftests/mock_gem_device.c