]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Use i915_gem_object_ggtt_pin_ww for reloc_iomap
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Wed, 11 May 2022 11:52:19 +0000 (13:52 +0200)
committerJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Thu, 19 May 2022 09:49:49 +0000 (12:49 +0300)
commit7b1d6924f27ba24b9e47abb9bd53d0bbc430a835
tree56b20f352c77f0162538c41a25e285070c0473dd
parent89e96d822bd51f7afe2d3e95a34099480b5c3d55
drm/i915: Use i915_gem_object_ggtt_pin_ww for reloc_iomap

When removing short term pins, I've changed the the batch buffer
pinning for relocation to use __i915_vma_pin, because
i915_gem_object_ggtt_pin_ww was destroying the old vma. This
caused regressions, because the functions are not identical.

Fix the regressions by calling i915_gem_object_ggtt_pin_ww() again
on ggtt-only platforms, but only if the batch can be pinned without
being moved.

Fixes: b5cfe6f7a6e1 ("drm/i915: Remove short-term pins from execbuf, v6.")
Cc: Matthew Auld <matthew.auld@intel.com>
Reported-by: Mateusz Jończyk <mat.jonczyk@o2.pl>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Acked-by: Matthew Auld <matthew.auld@intel.com>
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5806
Link: https://patchwork.freedesktop.org/patch/msgid/20220511115219.46507-1-maarten.lankhorst@linux.intel.com
(cherry picked from commit 451374eef622fca6f00eeeda89aaccb45a30a149)
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c