aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nv50_vm.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2011-03-31 01:40:43 -0400
committerBen Skeggs <bskeggs@redhat.com>2011-05-15 20:48:01 -0400
commit6dfdd7a61e8fc25552d9de1cb25272324dfc4c13 (patch)
treed158037ace54303d33323a14bafc8a2ef27a85b5 /drivers/gpu/drm/nouveau/nv50_vm.c
parent2d7b919c9b0ca3df1da2498bb0cede25ddd97e00 (diff)
drm/nouveau: working towards a common way to represent engines
There's lots of more-or-less independant engines present on NVIDIA GPUs these days, and we generally want to perform the same operations on them. Implementing new ones requires hooking into lots of different places, the aim of this work is to make this simpler and cleaner. NV84:NV98 PCRYPT moved over as a test. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv50_vm.c')
-rw-r--r--drivers/gpu/drm/nouveau/nv50_vm.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/nv50_vm.c b/drivers/gpu/drm/nouveau/nv50_vm.c
index 6c2694490741..1f58b0d62796 100644
--- a/drivers/gpu/drm/nouveau/nv50_vm.c
+++ b/drivers/gpu/drm/nouveau/nv50_vm.c
@@ -152,7 +152,7 @@ nv50_vm_flush(struct nouveau_vm *vm)
152 struct nouveau_instmem_engine *pinstmem = &dev_priv->engine.instmem; 152 struct nouveau_instmem_engine *pinstmem = &dev_priv->engine.instmem;
153 struct nouveau_fifo_engine *pfifo = &dev_priv->engine.fifo; 153 struct nouveau_fifo_engine *pfifo = &dev_priv->engine.fifo;
154 struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph; 154 struct nouveau_pgraph_engine *pgraph = &dev_priv->engine.graph;
155 struct nouveau_crypt_engine *pcrypt = &dev_priv->engine.crypt; 155 int i;
156 156
157 pinstmem->flush(vm->dev); 157 pinstmem->flush(vm->dev);
158 158
@@ -166,8 +166,10 @@ nv50_vm_flush(struct nouveau_vm *vm)
166 166
167 if (atomic_read(&vm->pgraph_refs)) 167 if (atomic_read(&vm->pgraph_refs))
168 pgraph->tlb_flush(vm->dev); 168 pgraph->tlb_flush(vm->dev);
169 if (atomic_read(&vm->pcrypt_refs)) 169 for (i = 0; i < NVOBJ_ENGINE_NR; i++) {
170 pcrypt->tlb_flush(vm->dev); 170 if (atomic_read(&vm->engref[i]))
171 dev_priv->eng[i]->tlb_flush(vm->dev, i);
172 }
171} 173}
172 174
173void 175void