-
- Downloads
drm/i915: Introduce intel_context.pin_mutex for pin management
Introduce a mutex to start locking the HW contexts independently of struct_mutex, with a view to reducing the coarse struct_mutex. The intel_context.pin_mutex is used to guard the transition to and from being pinned on the gpu, and so is required before starting to build any request. The intel_context will then remain pinned until the request completes, but the mutex can be released immediately unpin completion of pinning the context. A slight variant of the above is used by per-context sseu that wants to inspect the pinned status of the context, and requires that it remains stable (either !pinned or pinned) across its operation. By using the pin_mutex to serialise operations while pin_count==0, we can take that pin_mutex for stabilise the boolean pin status. v2: for Tvrtko! * Improved commit message. * Dropped _gpu suffix from gen8_modify_rpcs_gpu. v3: Repair the locking for sseu selftests 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/20190308132522.21573-7-chris@chris-wilson.co.uk
Showing
- drivers/gpu/drm/i915/i915_gem.c 1 addition, 1 deletiondrivers/gpu/drm/i915/i915_gem.c
- drivers/gpu/drm/i915/i915_gem_context.c 19 additions, 25 deletionsdrivers/gpu/drm/i915/i915_gem_context.c
- drivers/gpu/drm/i915/intel_context.c 50 additions, 8 deletionsdrivers/gpu/drm/i915/intel_context.c
- drivers/gpu/drm/i915/intel_context.h 22 additions, 16 deletionsdrivers/gpu/drm/i915/intel_context.h
- drivers/gpu/drm/i915/intel_context_types.h 7 additions, 1 deletiondrivers/gpu/drm/i915/intel_context_types.h
- drivers/gpu/drm/i915/intel_lrc.c 2 additions, 2 deletionsdrivers/gpu/drm/i915/intel_lrc.c
- drivers/gpu/drm/i915/intel_ringbuffer.c 2 additions, 2 deletionsdrivers/gpu/drm/i915/intel_ringbuffer.c
- drivers/gpu/drm/i915/selftests/mock_engine.c 1 addition, 1 deletiondrivers/gpu/drm/i915/selftests/mock_engine.c
Loading
Please register or sign in to comment