drm/i915/ttm: switch over to ttm_buddy_man
authorMatthew Auld <matthew.auld@intel.com>
Wed, 16 Jun 2021 15:25:00 +0000 (16:25 +0100)
committerMatthew Auld <matthew.auld@intel.com>
Wed, 16 Jun 2021 15:48:02 +0000 (16:48 +0100)
commitd53ec322dc7de32a59bf1c2a56b93e90fc2f1c28
treec2cef96cf23f6d1475ae5d5915f3b429402158e4
parent687c7d0fcf8014a006416d7dc7474a101a85bf00
drm/i915/ttm: switch over to ttm_buddy_man

Move back to the buddy allocator for managing device local memory, and
restore the lost mock selftests. Keep around the range manager related
bits, since we likely need this for managing stolen at some point. For
stolen we also don't need to reserve anything so no need to support a
generic reserve interface.

v2(Thomas):
    - bo->page_alignment is in page units, not bytes

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/20210616152501.394518-6-matthew.auld@intel.com
drivers/gpu/drm/i915/gem/i915_gem_ttm.c
drivers/gpu/drm/i915/intel_memory_region.c
drivers/gpu/drm/i915/intel_memory_region.h
drivers/gpu/drm/i915/intel_region_ttm.c
drivers/gpu/drm/i915/selftests/intel_memory_region.c
drivers/gpu/drm/i915/selftests/mock_region.c