]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Prevent lock-cycles between GPU waits and GPU resets
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 12 Jun 2019 08:52:46 +0000 (09:52 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 12 Jun 2019 11:06:11 +0000 (12:06 +0100)
commite29bec8f46426502619837b2066fc018f0bcf736
tree68c4739164b54339de55ee5bb7f3a480f97c953a
parent841d0d3e4b3b69517a071b86f755f7e40020d97b
drm/i915: Prevent lock-cycles between GPU waits and GPU resets

We cannot allow ourselves to wait on the GPU while holding any lock as we
may need to reset the GPU. While there is not an explicit lock between
the two operations, lockdep cannot detect the dependency. So let's tell
lockdep about the wait/reset dependency with an explicit lockmap.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190612085246.16374-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/intel_reset.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_request.c
drivers/gpu/drm/i915/selftests/mock_gem_device.c