diff options
author | Matthew Auld <matthew.auld@intel.com> | 2019-08-09 21:29:24 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-08-10 19:47:40 +0100 |
commit | 14d1b9a6247c4548015d940ca92dbea05c0245bb (patch) | |
tree | 2fb7c79a425eeb57ba6f5dbed109f2e6a674be6a /drivers/gpu/drm/i915/i915_globals.c | |
parent | drm/i915/blt: support copying objects (diff) | |
download | linux-dev-14d1b9a6247c4548015d940ca92dbea05c0245bb.tar.xz linux-dev-14d1b9a6247c4548015d940ca92dbea05c0245bb.zip |
drm/i915: buddy allocator
Simple buddy allocator. We want to allocate properly aligned
power-of-two blocks to promote usage of huge-pages for the GTT, so 64K,
2M and possibly even 1G. While we do support allocating stuff at a
specific offset, it is more intended for preallocating portions of the
address space, say for an initial framebuffer, for other uses drm_mm is
probably a much better fit. Anyway, hopefully this can all be thrown
away if we eventually move to having the core MM manage device memory.
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20190809202926.14545-2-matthew.auld@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/i915_globals.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_globals.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_globals.c b/drivers/gpu/drm/i915/i915_globals.c index 2d5fcba98841..be127cd28931 100644 --- a/drivers/gpu/drm/i915/i915_globals.c +++ b/drivers/gpu/drm/i915/i915_globals.c @@ -62,6 +62,7 @@ static void __i915_globals_cleanup(void) static __initconst int (* const initfn[])(void) = { i915_global_active_init, + i915_global_buddy_init, i915_global_context_init, i915_global_gem_context_init, i915_global_objects_init, |