aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_sgdma.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2010-03-15 02:43:47 -0400
committerBen Skeggs <bskeggs@redhat.com>2010-04-08 20:11:45 -0400
commit40b2a687bd92827ca144d3623cf48377d8f7680d (patch)
treeb153cf2cace99265ef44e53663f0b63bf8bd343b /drivers/gpu/drm/nouveau/nouveau_sgdma.c
parent0c324971986f1498ccd289cb2b4927a6fd3efbe5 (diff)
drm/nv50: add more 0x100c80 flushy magic
Fixes the !vbo_fifo path in the 3D driver on certain chipsets. Still not really any good idea of what exactly the magic achieves, but it makes things work. While we're at it, in the PCIEGART path, flush on unbinding also. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_sgdma.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_sgdma.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_sgdma.c b/drivers/gpu/drm/nouveau/nouveau_sgdma.c
index ed1590577b6c..554fb45730c1 100644
--- a/drivers/gpu/drm/nouveau/nouveau_sgdma.c
+++ b/drivers/gpu/drm/nouveau/nouveau_sgdma.c
@@ -171,6 +171,24 @@ nouveau_sgdma_unbind(struct ttm_backend *be)
171 } 171 }
172 dev_priv->engine.instmem.finish_access(nvbe->dev); 172 dev_priv->engine.instmem.finish_access(nvbe->dev);
173 173
174 if (dev_priv->card_type == NV_50) {
175 nv_wr32(dev, 0x100c80, 0x00050001);
176 if (!nv_wait(0x100c80, 0x00000001, 0x00000000)) {
177 NV_ERROR(dev, "timeout: (0x100c80 & 1) == 0 (2)\n");
178 NV_ERROR(dev, "0x100c80 = 0x%08x\n",
179 nv_rd32(dev, 0x100c80));
180 return -EBUSY;
181 }
182
183 nv_wr32(dev, 0x100c80, 0x00000001);
184 if (!nv_wait(0x100c80, 0x00000001, 0x00000000)) {
185 NV_ERROR(dev, "timeout: (0x100c80 & 1) == 0 (2)\n");
186 NV_ERROR(dev, "0x100c80 = 0x%08x\n",
187 nv_rd32(dev, 0x100c80));
188 return -EBUSY;
189 }
190 }
191
174 nvbe->bound = false; 192 nvbe->bound = false;
175 return 0; 193 return 0;
176} 194}