Re: [PATCH 06/66] drm/i915: Export a preallocate variant of i915_active_acquire()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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@xxxxxxxxxxxxxxxxxx>
---
  .../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


_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux