drm/i915/gem: Try allocating va from free space
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 1 Apr 2020 19:41:35 +0000 (20:41 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 1 Apr 2020 20:57:48 +0000 (21:57 +0100)
commit8a338f4bf64242e3284b4d937890aee8899500cd
tree38604def19180e9ee80f07d6122dbcd2dd44dde4
parent0d961c4610ff24fdd6d98782b443e27d176aa006
drm/i915/gem: Try allocating va from free space

If the current node/entry location is occupied, and the object is not
pinned, try assigning it some free space. We cannot wait here, so if in
doubt, we unreserve and try to grab all at once.

v2: Use the final pin_flags so that we won't have to move the object if
we find the wrong free space.

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/20200401194135.5442-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c