]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/gt: Mark context->active_count as protected by timeline->mutex
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 16 Aug 2019 12:09:59 +0000 (13:09 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 16 Aug 2019 17:02:06 +0000 (18:02 +0100)
commit1e28740e8569eb2a692d8e9817239b4eaa02c7ef
tree5426a2907e0afa73ecfa02e9a5a5027795f7bc31
parentb7fd32f7fe2c5462aedd6e7113b5420690da8618
drm/i915/gt: Mark context->active_count as protected by timeline->mutex

We use timeline->mutex to protect modifications to
context->active_count, and the associated enable/disable callbacks.
Due to complications with engine-pm barrier there is a path where we used
a "superlock" to provide serialised protect and so could not
unconditionally assert with lockdep that it was always held. However,
we can mark the mutex as taken (noting that we may be nested underneath
ourselves) which means we can be reassured the right timeline->mutex is
always treated as held and let lockdep roam free.

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