drm/i915/ttm: Calculate the object placement at get_pages time
authorThomas Hellström <thomas.hellstrom@linux.intel.com>
Wed, 16 Jun 2021 15:24:57 +0000 (16:24 +0100)
committerMatthew Auld <matthew.auld@intel.com>
Wed, 16 Jun 2021 15:47:54 +0000 (16:47 +0100)
commit38f28c0695c0413b701f67105bff2573c667492a
tree6c9c0aac002c7db01ecd8690ef2192611c97bac7
parentf701b16d4cc535d24facdfdd21dc97a3691e5576
drm/i915/ttm: Calculate the object placement at get_pages time

Instead of relying on a static placement, calculate at get_pages() time.
This should work for LMEM regions and system for now. For stolen we need
to take preallocated range into account. That will if needed be added
later.

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