aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nv50_instmem.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2010-08-26 20:00:25 -0400
committerBen Skeggs <bskeggs@redhat.com>2010-12-07 22:48:10 -0500
commita11c3198c9ba38d81e25b65e3908d531feba1372 (patch)
tree89f9489d91af56cf9a4a376ef5310989dd54bebb /drivers/gpu/drm/nouveau/nv50_instmem.c
parent573a2a37e8648a3249426c816f51e7ef50f6f73e (diff)
drm/nv50: import new vm code
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv50_instmem.c')
-rw-r--r--drivers/gpu/drm/nouveau/nv50_instmem.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/gpu/drm/nouveau/nv50_instmem.c b/drivers/gpu/drm/nouveau/nv50_instmem.c
index 1e7d50397e4a..4eb2f0835e27 100644
--- a/drivers/gpu/drm/nouveau/nv50_instmem.c
+++ b/drivers/gpu/drm/nouveau/nv50_instmem.c
@@ -27,7 +27,9 @@
27 27
28#include "drmP.h" 28#include "drmP.h"
29#include "drm.h" 29#include "drm.h"
30
30#include "nouveau_drv.h" 31#include "nouveau_drv.h"
32#include "nouveau_vm.h"
31 33
32struct nv50_instmem_priv { 34struct nv50_instmem_priv {
33 uint32_t save1700[5]; /* 0x1700->0x1710 */ 35 uint32_t save1700[5]; /* 0x1700->0x1710 */
@@ -404,7 +406,7 @@ nv50_instmem_map(struct nouveau_gpuobj *gpuobj)
404 } 406 }
405 dev_priv->engine.instmem.flush(dev); 407 dev_priv->engine.instmem.flush(dev);
406 408
407 nv50_vm_flush(dev, 6); 409 nv50_vm_flush_engine(dev, 6);
408 410
409 node->ramin = ramin; 411 node->ramin = ramin;
410 gpuobj->pinst = ramin->start; 412 gpuobj->pinst = ramin->start;
@@ -454,11 +456,3 @@ nv84_instmem_flush(struct drm_device *dev)
454 NV_ERROR(dev, "PRAMIN flush timeout\n"); 456 NV_ERROR(dev, "PRAMIN flush timeout\n");
455} 457}
456 458
457void
458nv50_vm_flush(struct drm_device *dev, int engine)
459{
460 nv_wr32(dev, 0x100c80, (engine << 16) | 1);
461 if (!nv_wait(dev, 0x100c80, 0x00000001, 0x00000000))
462 NV_ERROR(dev, "vm flush timeout: engine %d\n", engine);
463}
464