]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/ttm: ensure we unmap when purging
authorMatthew Auld <matthew.auld@intel.com>
Thu, 6 Jan 2022 17:49:10 +0000 (17:49 +0000)
committerTvrtko Ursulin <tvrtko.ursulin@intel.com>
Mon, 10 Jan 2022 14:00:47 +0000 (14:00 +0000)
commit5079fb5a7270d8158f84fb06386691455b6d5a82
treebec15f7825e7fb16c91a99f605097e6e125f6653
parenta0ed4289591979b7aede0e505b2896d748610101
drm/i915/ttm: ensure we unmap when purging

Purging can happen during swapping out, or directly invoked with the
madvise ioctl. In such cases this doesn't involve a ttm move, which
skips umapping the object.

v2(Thomas):
- add ttm_truncate helper, and just call into i915_ttm_move_notify() to
  handle the unmapping step

Fixes: 2192eb8afea9 ("drm/i915/ttm: Introduce a TTM i915 gem object backend")
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/20220106174910.280616-4-matthew.auld@intel.com
(cherry picked from commit ab4911b7d411ab2ef3b38322178b9138e156c393)
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
drivers/gpu/drm/i915/gem/i915_gem_ttm.c