[Intel-gfx] [PATCH 06/66] drm/i915: Export a preallocate variant of i915_active_acquire()
Thomas Hellström (Intel)
thomas_os at shipmail.org
Tue Jul 21 15:33:59 UTC 2020
On 2020-07-15 13:50, Chris Wilson wrote:
> Sometimes we have to be very careful not to allocate underneath a mutex
> (or spinlock) and yet still want to track activity. Enter
> i915_active_acquire_for_context(). This raises the activity counter on
> i915_active prior to use and ensures that the fence-tree contains a slot
> for the context.
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> ---
> .../gpu/drm/i915/gem/i915_gem_execbuffer.c | 2 +-
> drivers/gpu/drm/i915/gt/intel_timeline.c | 4 +-
> drivers/gpu/drm/i915/i915_active.c | 136 +++++++++++++++---
> drivers/gpu/drm/i915/i915_active.h | 12 +-
> 4 files changed, 126 insertions(+), 28 deletions(-)
>
...
> /*
> * We track the most recently used timeline to skip a rbtree search
> @@ -230,8 +260,8 @@ active_instance(struct i915_active *ref, struct intel_timeline *tl)
> * after the previous activity has been retired, or if it matches the
> * current timeline.
> */
In addition to Tvrtko's comments, Should this comment be moved to
__active_lookup() ?
/Thomas
More information about the Intel-gfx
mailing list