drm/i915/ttm: Adjust gem flags and caching settings after a move
authorThomas Hellström <thomas.hellstrom@linux.intel.com>
Thu, 24 Jun 2021 08:42:39 +0000 (10:42 +0200)
committerMatthew Auld <matthew.auld@intel.com>
Thu, 24 Jun 2021 17:51:00 +0000 (18:51 +0100)
commit3c2b8f326e7f73dd10ae422dc65603a858f6c6b4
tree62e6c1784f6b2e93ef788d86126d6faf7fd8859e
parent0ff375759f64a0b81853d9d9b4c5b5b4b06f4a2c
drm/i915/ttm: Adjust gem flags and caching settings after a move

After a TTM move or object init we need to update the i915 gem flags and
caching settings to reflect the new placement. Currently caching settings
are not changed during the lifetime of an object, although that might
change moving forward if we run into performance issues or issues with
WC system page allocations.
Also introduce gpu_binds_iomem() and cpu_maps_iomem() to clean up the
various ways we previously used to detect this.
Finally, initialize the TTM object reserved to be able to update
flags and caching before anyone else gets hold of the object.

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