]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Provide an i915_active.acquire callback
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 21 Jun 2019 18:38:00 +0000 (19:38 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 21 Jun 2019 18:47:55 +0000 (19:47 +0100)
commit221628386a33225bf844740ec7c221450715b0f7
treeb4b16e612ca8a79198b88d72c3658653efc9c6ae
parent5f45217604dd765b69b199f215ba7e3405f8e165
drm/i915: Provide an i915_active.acquire callback

If we introduce a callback for i915_active that is only called the first
time we use the i915_active and is symmetrically paired with the
i915_active.retire callback, we can replace the open-coded and
non-atomic implementations -- which will be very fragile (i.e. broken)
upon removing the struct_mutex serialisation.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190621183801.23252-4-chris@chris-wilson.co.uk
13 files changed:
drivers/gpu/drm/i915/gem/i915_gem_context.c
drivers/gpu/drm/i915/gt/intel_context.c
drivers/gpu/drm/i915/gt/intel_context.h
drivers/gpu/drm/i915/gt/intel_lrc.c
drivers/gpu/drm/i915/gt/intel_ringbuffer.c
drivers/gpu/drm/i915/gt/intel_timeline.c
drivers/gpu/drm/i915/gt/mock_engine.c
drivers/gpu/drm/i915/i915_active.c
drivers/gpu/drm/i915/i915_active.h
drivers/gpu/drm/i915/i915_active_types.h
drivers/gpu/drm/i915/i915_gem_gtt.c
drivers/gpu/drm/i915/i915_vma.c
drivers/gpu/drm/i915/selftests/i915_active.c