diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2011-03-28 19:56:14 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2011-04-04 21:38:02 -0400 |
commit | 2b4cebe4e165b0ef30a138e4cf602538dea15583 (patch) | |
tree | 35dc42629387e7e6922e74b3afb7b31c82aaf139 | |
parent | c0929b499f834210561fe5e8c48bcad4f2130d25 (diff) |
drm/nv50: use "nv86" tlb flush method on everything except 0x50/0xac
It has been reported that this greatly improves (and possibly fixes
completely) the stability of NVA3+ chipsets. In traces of my NVA8,
NVIDIA now appear to be doing this too.
The most recent traces of 0x50 and 0xac I could find don't show NVIDIA
checking PGRAPH status on these flushes, so for now, we won't either.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_drv.h | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_state.c | 12 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nv50_graph.c | 2 |
3 files changed, 6 insertions, 10 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_drv.h b/drivers/gpu/drm/nouveau/nouveau_drv.h index fff180a99867..59ed5be403ef 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drv.h +++ b/drivers/gpu/drm/nouveau/nouveau_drv.h | |||
@@ -1190,7 +1190,7 @@ extern int nv50_graph_load_context(struct nouveau_channel *); | |||
1190 | extern int nv50_graph_unload_context(struct drm_device *); | 1190 | extern int nv50_graph_unload_context(struct drm_device *); |
1191 | extern int nv50_grctx_init(struct nouveau_grctx *); | 1191 | extern int nv50_grctx_init(struct nouveau_grctx *); |
1192 | extern void nv50_graph_tlb_flush(struct drm_device *dev); | 1192 | extern void nv50_graph_tlb_flush(struct drm_device *dev); |
1193 | extern void nv86_graph_tlb_flush(struct drm_device *dev); | 1193 | extern void nv84_graph_tlb_flush(struct drm_device *dev); |
1194 | extern struct nouveau_enum nv50_data_error_names[]; | 1194 | extern struct nouveau_enum nv50_data_error_names[]; |
1195 | 1195 | ||
1196 | /* nvc0_graph.c */ | 1196 | /* nvc0_graph.c */ |
diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c index 4fcbd091a117..1e7e006c75e4 100644 --- a/drivers/gpu/drm/nouveau/nouveau_state.c +++ b/drivers/gpu/drm/nouveau/nouveau_state.c | |||
@@ -376,15 +376,11 @@ static int nouveau_init_engine_ptrs(struct drm_device *dev) | |||
376 | engine->graph.destroy_context = nv50_graph_destroy_context; | 376 | engine->graph.destroy_context = nv50_graph_destroy_context; |
377 | engine->graph.load_context = nv50_graph_load_context; | 377 | engine->graph.load_context = nv50_graph_load_context; |
378 | engine->graph.unload_context = nv50_graph_unload_context; | 378 | engine->graph.unload_context = nv50_graph_unload_context; |
379 | if (dev_priv->chipset != 0x86) | 379 | if (dev_priv->chipset == 0x50 || |
380 | dev_priv->chipset == 0xac) | ||
380 | engine->graph.tlb_flush = nv50_graph_tlb_flush; | 381 | engine->graph.tlb_flush = nv50_graph_tlb_flush; |
381 | else { | 382 | else |
382 | /* from what i can see nvidia do this on every | 383 | engine->graph.tlb_flush = nv84_graph_tlb_flush; |
383 | * pre-NVA3 board except NVAC, but, we've only | ||
384 | * ever seen problems on NV86 | ||
385 | */ | ||
386 | engine->graph.tlb_flush = nv86_graph_tlb_flush; | ||
387 | } | ||
388 | engine->fifo.channels = 128; | 384 | engine->fifo.channels = 128; |
389 | engine->fifo.init = nv50_fifo_init; | 385 | engine->fifo.init = nv50_fifo_init; |
390 | engine->fifo.takedown = nv50_fifo_takedown; | 386 | engine->fifo.takedown = nv50_fifo_takedown; |
diff --git a/drivers/gpu/drm/nouveau/nv50_graph.c b/drivers/gpu/drm/nouveau/nv50_graph.c index 8675b00caf18..b02a5b1e7d37 100644 --- a/drivers/gpu/drm/nouveau/nv50_graph.c +++ b/drivers/gpu/drm/nouveau/nv50_graph.c | |||
@@ -503,7 +503,7 @@ nv50_graph_tlb_flush(struct drm_device *dev) | |||
503 | } | 503 | } |
504 | 504 | ||
505 | void | 505 | void |
506 | nv86_graph_tlb_flush(struct drm_device *dev) | 506 | nv84_graph_tlb_flush(struct drm_device *dev) |
507 | { | 507 | { |
508 | struct drm_nouveau_private *dev_priv = dev->dev_private; | 508 | struct drm_nouveau_private *dev_priv = dev->dev_private; |
509 | struct nouveau_timer_engine *ptimer = &dev_priv->engine.timer; | 509 | struct nouveau_timer_engine *ptimer = &dev_priv->engine.timer; |