Commit b9f327f1 authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/mmu/gp100-: enable mmu invalidate depth optimisation

This causes us to invalidate MMU only at the level we made modifications -
ie: if we've only modified PTEs, there's no need to have MMU dump the PDs
it's fetched into L2.
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent b448a266
...@@ -466,7 +466,6 @@ void ...@@ -466,7 +466,6 @@ void
gp100_vmm_flush(struct nvkm_vmm *vmm, int depth) gp100_vmm_flush(struct nvkm_vmm *vmm, int depth)
{ {
u32 type = (5 /* CACHE_LEVEL_UP_TO_PDE3 */ - depth) << 24; u32 type = (5 /* CACHE_LEVEL_UP_TO_PDE3 */ - depth) << 24;
type = 0; /*XXX: need to confirm stuff works with depth enabled... */
if (atomic_read(&vmm->engref[NVKM_SUBDEV_BAR])) if (atomic_read(&vmm->engref[NVKM_SUBDEV_BAR]))
type |= 0x00000004; /* HUB_ONLY */ type |= 0x00000004; /* HUB_ONLY */
type |= 0x00000001; /* PAGE_ALL */ type |= 0x00000001; /* PAGE_ALL */
......
...@@ -28,9 +28,9 @@ tu102_vmm_flush(struct nvkm_vmm *vmm, int depth) ...@@ -28,9 +28,9 @@ tu102_vmm_flush(struct nvkm_vmm *vmm, int depth)
{ {
struct nvkm_subdev *subdev = &vmm->mmu->subdev; struct nvkm_subdev *subdev = &vmm->mmu->subdev;
struct nvkm_device *device = subdev->device; struct nvkm_device *device = subdev->device;
u32 type = depth << 24; /*XXX: not confirmed */ u32 type = (5 /* CACHE_LEVEL_UP_TO_PDE3 */ - depth) << 24;
type = 0x00000001; /* PAGE_ALL */ type |= 0x00000001; /* PAGE_ALL */
if (atomic_read(&vmm->engref[NVKM_SUBDEV_BAR])) if (atomic_read(&vmm->engref[NVKM_SUBDEV_BAR]))
type |= 0x00000004; /* HUB_ONLY */ type |= 0x00000004; /* HUB_ONLY */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment