diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2010-07-14 21:02:54 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-07-25 21:41:36 -0400 |
commit | 734ee8357ac2685a306acd598826d5eb8a3fca30 (patch) | |
tree | 6b09765991db71aabbac08a1e252e05de4309db0 | |
parent | 0edeb0c024f3af7d4dd8dde44ad1082b265ebc9a (diff) |
drm/nv50: use correct PRAMIN flush register on original nv50
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_drv.h | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_state.c | 5 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nv50_instmem.c | 8 |
3 files changed, 13 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h index 587a0ab1fe67..16856e0354f8 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.h +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h | |||
@@ -1028,6 +1028,7 @@ extern void nv50_instmem_clear(struct drm_device *, struct nouveau_gpuobj *); | |||
1028 | extern int nv50_instmem_bind(struct drm_device *, struct nouveau_gpuobj *); | 1028 | extern int nv50_instmem_bind(struct drm_device *, struct nouveau_gpuobj *); |
1029 | extern int nv50_instmem_unbind(struct drm_device *, struct nouveau_gpuobj *); | 1029 | extern int nv50_instmem_unbind(struct drm_device *, struct nouveau_gpuobj *); |
1030 | extern void nv50_instmem_flush(struct drm_device *); | 1030 | extern void nv50_instmem_flush(struct drm_device *); |
1031 | extern void nv84_instmem_flush(struct drm_device *); | ||
1031 | extern void nv50_vm_flush(struct drm_device *, int engine); | 1032 | extern void nv50_vm_flush(struct drm_device *, int engine); |
1032 | 1033 | ||
1033 | /* nv04_mc.c */ | 1034 | /* nv04_mc.c */ |
diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c index c58ff9c48603..0bf79bf8e61a 100644 --- a/drivers/gpu/drm/nouveau/nouveau_state.c +++ b/drivers/gpu/drm/nouveau/nouveau_state.c | |||
@@ -266,7 +266,10 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev) | |||
266 | engine->instmem.clear = nv50_instmem_clear; | 266 | engine->instmem.clear = nv50_instmem_clear; |
267 | engine->instmem.bind = nv50_instmem_bind; | 267 | engine->instmem.bind = nv50_instmem_bind; |
268 | engine->instmem.unbind = nv50_instmem_unbind; | 268 | engine->instmem.unbind = nv50_instmem_unbind; |
269 | engine->instmem.flush = nv50_instmem_flush; | 269 | if (dev_priv->chipset == 0x50) |
270 | engine->instmem.flush = nv50_instmem_flush; | ||
271 | else | ||
272 | engine->instmem.flush = nv84_instmem_flush; | ||
270 | engine->mc.init = nv50_mc_init; | 273 | engine->mc.init = nv50_mc_init; |
271 | engine->mc.takedown = nv50_mc_takedown; | 274 | engine->mc.takedown = nv50_mc_takedown; |
272 | engine->timer.init = nv04_timer_init; | 275 | engine->timer.init = nv04_timer_init; |
diff --git a/drivers/gpu/drm/nouveau/nv50_instmem.c b/drivers/gpu/drm/nouveau/nv50_instmem.c index 2a5ec887291c..2ed893cbff69 100644 --- a/drivers/gpu/drm/nouveau/nv50_instmem.c +++ b/drivers/gpu/drm/nouveau/nv50_instmem.c | |||
@@ -486,6 +486,14 @@ nv50_instmem_unbind(struct drm_device *dev, struct nouveau_gpuobj *gpuobj) | |||
486 | void | 486 | void |
487 | nv50_instmem_flush(struct drm_device *dev) | 487 | nv50_instmem_flush(struct drm_device *dev) |
488 | { | 488 | { |
489 | nv_wr32(dev, 0x00330c, 0x00000001); | ||
490 | if (!nv_wait(0x00330c, 0x00000001, 0x00000000)) | ||
491 | NV_ERROR(dev, "PRAMIN flush timeout\n"); | ||
492 | } | ||
493 | |||
494 | void | ||
495 | nv84_instmem_flush(struct drm_device *dev) | ||
496 | { | ||
489 | nv_wr32(dev, 0x070000, 0x00000001); | 497 | nv_wr32(dev, 0x070000, 0x00000001); |
490 | if (!nv_wait(0x070000, 0x00000001, 0x00000000)) | 498 | if (!nv_wait(0x070000, 0x00000001, 0x00000000)) |
491 | NV_ERROR(dev, "PRAMIN flush timeout\n"); | 499 | NV_ERROR(dev, "PRAMIN flush timeout\n"); |