summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/intel_region_ttm.c
diff options
context:
space:
mode:
authorMatthew Auld <matthew.auld@intel.com>2022-02-25 17:54:59 +0300
committerMatthew Auld <matthew.auld@intel.com>2022-02-28 11:47:34 +0300
commit26ffcbbef712f6fb52f16e6f7d5cde736b80d8c4 (patch)
tree560a461363043e9bb9246a8c3b9e7c532d93eb41 /drivers/gpu/drm/i915/intel_region_ttm.c
parent30b9d1b3ef374403652fc10fa36b9a5f32cc274d (diff)
downloadlinux-26ffcbbef712f6fb52f16e6f7d5cde736b80d8c4.tar.xz
drm/i915/buddy: track available visible size
Track the total amount of available visible memory, and also track per-resource the amount of used visible memory. For now this is useful for our debug output, and deciding if it is even worth calling into the buddy allocator. In the future tracking the per-resource visible usage will be useful for when deciding if we should attempt to evict certain buffers. v2: - s/place->lpfn/lpfn/, that way we can avoid scanning the list if the entire range is already mappable. - Move the end declaration inside the if block(Thomas). - Make sure to also account for reserved memory. 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> Acked-by: Nirmoy Das <nirmoy.das@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220225145502.331818-4-matthew.auld@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_region_ttm.c')
-rw-r--r--drivers/gpu/drm/i915/intel_region_ttm.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_region_ttm.c b/drivers/gpu/drm/i915/intel_region_ttm.c
index 6cfe9090ede7..737ef3f4ab54 100644
--- a/drivers/gpu/drm/i915/intel_region_ttm.c
+++ b/drivers/gpu/drm/i915/intel_region_ttm.c
@@ -87,6 +87,7 @@ int intel_region_ttm_init(struct intel_memory_region *mem)
ret = i915_ttm_buddy_man_init(bdev, mem_type, false,
resource_size(&mem->region),
+ mem->io_size,
mem->min_page_size, PAGE_SIZE);
if (ret)
return ret;