aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/include
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2017-11-01 03:56:19 +1000
committerBen Skeggs <bskeggs@redhat.com>2017-11-02 13:32:24 +1000
commit9a45ddaaa674aa103cd74a0df9a3f9c2c8fb3124 (patch)
tree7079567c725f676294b36dec2ac60ab5c6f23df6 /drivers/gpu/drm/nouveau/include
parentdrm/nouveau/mmu: automatically handle "un-bootstrapping" of vmm (diff)
downloadlinux-dev-9a45ddaaa674aa103cd74a0df9a3f9c2c8fb3124.tar.xz
linux-dev-9a45ddaaa674aa103cd74a0df9a3f9c2c8fb3124.zip
drm/nouveau/mmu: implement page table cache
Builds up and maintains a small cache of each page table size in order to reduce the frequency of expensive allocations, particularly in the pathological case where an address range ping-pongs between allocated and free. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/include')
-rw-r--r--drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h
index f26407869e20..61cc4e32e449 100644
--- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h
+++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h
@@ -63,6 +63,11 @@ struct nvkm_mmu {
u8 lpg_shift;
struct nvkm_vmm *vmm;
+
+ struct {
+ struct mutex mutex;
+ struct list_head list;
+ } ptc;
};
int nv04_mmu_new(struct nvkm_device *, int, struct nvkm_mmu **);