]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Reorder execobject[] to insert non-48b objects into the low 4G
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 12 Sep 2018 10:11:33 +0000 (11:11 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 12 Sep 2018 14:34:49 +0000 (15:34 +0100)
commit5821485655f9021adff24fcc202ffaf45941ad6c
tree37d28b637f939b088b180a545152bc8745e94675
parent9a304c99daeb19b34a1bcab41261247151cad337
drm/i915: Reorder execobject[] to insert non-48b objects into the low 4G

If the caller supplies more than 4G of objects and than one that has to
be in the low 4G, it is possible for the low 4G to be full before we
attempt to find room for the last object that must be there. As we don't
reorder the two types, every pass hits the same problem and we fail with
ENOSPC. However, if we impose a little bit of ordering between the two
classes of objects, on the second pass we will be able to fit the
special object as we do it first. For setups that only use !48b objects,
we now reverse the order between passes, hopefully making the subsequent
passes more likely to succeed given that we are trying a different
order (rather than repeating the previous pass!)

v2: Quick one line explanation for the relative priorities given to
reservations.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180912101133.31377-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_gem_execbuffer.c