]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Track the last-active inside the i915_vma
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 6 Jul 2018 12:31:57 +0000 (13:31 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 6 Jul 2018 17:23:07 +0000 (18:23 +0100)
commit6c3254d94c1108dcc516ad9eb5c969b063693dcd
tree6022514e2a3ddcb8069e34ad9629152e53e294e2
parent9e6763a9440ad5f6c8b5dde53b182d9b413dbabe
drm/i915: Track the last-active inside the i915_vma

Using a VMA on more than one timeline concurrently is the exception
rather than the rule (using it concurrently on multiple engines). As we
expect to only use one active tracker, store the most recently used
tracker inside the i915_vma itself and only fallback to the rbtree if
we need a second or more concurrent active trackers.

v2: Comments on how we overwrite any existing last_active cache.
v3: __list_del_entry() before list_replace_init() is confusing and, much
more important, entirely redundant.
v4: Note that both last_active and the rbtree may be simultaneously
tracking this timeline, albeit with different requests, and so the vma
may be retired twice for the same timeline.
v5: No, that list_del is required!

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/20180706123157.9645-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_vma.c
drivers/gpu/drm/i915/i915_vma.h