summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_dma.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2015-04-07 16:20:57 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-04-10 10:17:07 +0200
commitefab6d8dd158fdccbe6a030f89fbf9ca0a9564e4 (patch)
treec559b230c847f851432b7d00b668c287e50e6937 /drivers/gpu/drm/i915/i915_dma.c
parentf1e2daea79e96a50cdbca1bdd1a70900e1af5da1 (diff)
downloadop-kernel-dev-efab6d8dd158fdccbe6a030f89fbf9ca0a9564e4.zip
op-kernel-dev-efab6d8dd158fdccbe6a030f89fbf9ca0a9564e4.tar.gz
drm/i915: Use a separate slab for requests
requests are even more frequently allocated than objects and equally benefit from having a dedicated slab. v2: Rebase Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_dma.c')
-rw-r--r--drivers/gpu/drm/i915/i915_dma.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 8f5428b..180b5d9 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -1006,8 +1006,10 @@ out_regs:
put_bridge:
pci_dev_put(dev_priv->bridge_dev);
free_priv:
- if (dev_priv->slab)
- kmem_cache_destroy(dev_priv->slab);
+ if (dev_priv->requests)
+ kmem_cache_destroy(dev_priv->requests);
+ if (dev_priv->objects)
+ kmem_cache_destroy(dev_priv->objects);
kfree(dev_priv);
return ret;
}
@@ -1090,8 +1092,10 @@ int i915_driver_unload(struct drm_device *dev)
if (dev_priv->regs != NULL)
pci_iounmap(dev->pdev, dev_priv->regs);
- if (dev_priv->slab)
- kmem_cache_destroy(dev_priv->slab);
+ if (dev_priv->requests)
+ kmem_cache_destroy(dev_priv->requests);
+ if (dev_priv->objects)
+ kmem_cache_destroy(dev_priv->objects);
pci_dev_put(dev_priv->bridge_dev);
kfree(dev_priv);
OpenPOWER on IntegriCloud