summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
diff options
context:
space:
mode:
authorDavid Gow <david@davidgow.net>2024-08-04 17:18:48 +0800
committerAndi Shyti <andi.shyti@linux.intel.com>2024-08-06 14:13:23 +0100
commit92653f2a572505adaf7f13f695c1907e71a1dc84 (patch)
tree78ba4dace5fe2bc71779cf5259871134c769e091 /drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
parent54bf0af90844fbf18f5be3272eda69198dfdb622 (diff)
downloadlinux-92653f2a572505adaf7f13f695c1907e71a1dc84.tar.gz
linux-92653f2a572505adaf7f13f695c1907e71a1dc84.tar.bz2
linux-92653f2a572505adaf7f13f695c1907e71a1dc84.zip
drm/i915: Attempt to get pages without eviction first
In commit a78a8da51b36 ("drm/ttm: replace busy placement with flags v6"), __i915_ttm_get_pages was updated to use flags instead of the separate 'busy' placement list. However, the behaviour was subtly changed. Originally, the function would attempt to use the preferred placement without eviction, and give an opportunity to restart the operation before falling back to allowing eviction. This was unintentionally changed, as the preferred placement was not given the TTM_PL_FLAG_DESIRED flag, and so eviction could be triggered in that first pass. This caused thrashing, and a significant performance regression on DG2 systems with small BAR. For example, Minecraft and Team Fortress 2 would drop to single-digit framerates. Restore the original behaviour by marking the initial placement as desired on that first attempt. Also, rework this to use a separate struct ttm_palcement, as the individual placements are marked 'const', so hot-patching the flags is even more dodgy than before. Thanks to Justin Brewer for bisecting this. Fixes: a78a8da51b36 ("drm/ttm: replace busy placement with flags v6") Link: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11255 Signed-off-by: David Gow <david@davidgow.net> Reviewed-by: Jonathan Cavitt <jonathan.cavitt@intel.com> Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com> Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240804091851.122186-3-david@davidgow.net
Diffstat (limited to 'drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c')
0 files changed, 0 insertions, 0 deletions