drm/i915: opportunistically apply ALLOC_CONTIGIOUS
authorMatthew Auld <matthew.auld@intel.com>
Wed, 2 Feb 2022 17:31:54 +0000 (17:31 +0000)
committerMatthew Auld <matthew.auld@intel.com>
Tue, 8 Mar 2022 12:35:56 +0000 (12:35 +0000)
commit2ed38cec5606dfe50893b36a1363379f9609e0bb
treea4f03499a01fd8d036e8ecfeb60c51f2d4829f47
parentc64fa77dd4609cb8cd53fbb73b02434ae8212c7a
drm/i915: opportunistically apply ALLOC_CONTIGIOUS

It looks like this code was accidentally dropped at some point(in a
slightly different form), so add it back. The gist is that if we know
the allocation will be one single chunk, then we can just annotate the
BO with I915_BO_ALLOC_CONTIGUOUS, even if the user doesn't bother. In
the future this should allow us to avoid using vmap for such objects,
in some upcoming patches.

v2(Thomas):
  - Tweak the commit message to mention the future motivation

Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220202173154.3758970-1-matthew.auld@intel.com
drivers/gpu/drm/i915/gem/i915_gem_region.c