diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2019-02-05 13:00:04 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-02-05 17:17:34 +0000 |
commit | 5f5c139d6900b3338963bddcd8a567dcad33cf92 (patch) | |
tree | 5251e6fe8868ad6828904b9b2767b5acfb78f416 /drivers/gpu/drm/i915/i915_pci.c | |
parent | a42375af0a305e9c299cffd739a39e415930614c (diff) | |
download | linux-stable-5f5c139d6900b3338963bddcd8a567dcad33cf92.tar.gz linux-stable-5f5c139d6900b3338963bddcd8a567dcad33cf92.tar.bz2 linux-stable-5f5c139d6900b3338963bddcd8a567dcad33cf92.zip |
drm/i915: Allocate active tracking nodes from a slabcache
Wrap the active tracking for a GPU references in a slabcache for faster
allocations, and hopefully better fragmentation reduction.
v3: Nothing device specific left, it's just a slabcache that we can
make global.
v4: Include i915_active.h and don't put the initfunc under DEBUG_GEM
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190205130005.2807-4-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/i915_pci.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_pci.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c index 55c9058e91a8..c6533c57ea2f 100644 --- a/drivers/gpu/drm/i915/i915_pci.c +++ b/drivers/gpu/drm/i915/i915_pci.c @@ -26,6 +26,7 @@ #include <linux/vgaarb.h> #include <linux/vga_switcheroo.h> +#include "i915_active.h" #include "i915_drv.h" #include "i915_selftest.h" @@ -798,6 +799,8 @@ static int __init i915_init(void) bool use_kms = true; int err; + i915_global_active_init(); + err = i915_mock_selftests(); if (err) return err > 0 ? 0 : err; @@ -829,6 +832,7 @@ static void __exit i915_exit(void) return; pci_unregister_driver(&i915_pci_driver); + i915_global_active_exit(); } module_init(i915_init); |