drm/i915/ttm: make eviction mappable aware
authorMatthew Auld <matthew.auld@intel.com>
Mon, 28 Feb 2022 12:36:04 +0000 (12:36 +0000)
committerMatthew Auld <matthew.auld@intel.com>
Tue, 1 Mar 2022 08:50:45 +0000 (08:50 +0000)
commit9373505967ffc1b7b8331a21ba86ea436c09b981
treeadb5af1e6c46f69fa7b9e60767781e2c83ba7bc5
parentc03d982670335d732e5d623af31c126387ae126a
drm/i915/ttm: make eviction mappable aware

If we need to make room for some mappable object, then we should
only victimize objects that have one or pages that occupy the visible
portion of LMEM. Let's also create a new priority hint for objects that
are placed in mappable memory, where we know that CPU access was
requested, that way we hopefully victimize these last.

v2(Thomas): s/TTM_PL_PRIV/I915_PL_LMEM0/

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/20220228123607.580432-1-matthew.auld@intel.com
drivers/gpu/drm/i915/gem/i915_gem_ttm.c