aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorFrancisco Jerez <currojerez@riseup.net>2010-10-18 10:15:15 -0400
committerBen Skeggs <bskeggs@redhat.com>2010-12-03 00:06:49 -0500
commit0541324abce0225a795222558fdfe35c8dbc5b4f (patch)
treeed9ae66b92d1c2ff52265cb01f3cf74b0e17fd5b /drivers/gpu
parent889fa93dc0ab94b9255e9dd8e2036facfee5485e (diff)
drm/nv40: Ignore sync-to-vblank active when waiting for idle.
Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_reg.h1
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_state.c8
2 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_reg.h b/drivers/gpu/drm/nouveau/nouveau_reg.h
index 1b42541ca9e5..1bbe7037cf99 100644
--- a/drivers/gpu/drm/nouveau/nouveau_reg.h
+++ b/drivers/gpu/drm/nouveau/nouveau_reg.h
@@ -332,6 +332,7 @@
332#define NV04_PGRAPH_BSWIZZLE5 0x004006A0 332#define NV04_PGRAPH_BSWIZZLE5 0x004006A0
333#define NV03_PGRAPH_STATUS 0x004006B0 333#define NV03_PGRAPH_STATUS 0x004006B0
334#define NV04_PGRAPH_STATUS 0x00400700 334#define NV04_PGRAPH_STATUS 0x00400700
335# define NV40_PGRAPH_STATUS_SYNC_STALL 0x00004000
335#define NV04_PGRAPH_TRAPPED_ADDR 0x00400704 336#define NV04_PGRAPH_TRAPPED_ADDR 0x00400704
336#define NV04_PGRAPH_TRAPPED_DATA 0x00400708 337#define NV04_PGRAPH_TRAPPED_DATA 0x00400708
337#define NV04_PGRAPH_SURFACE 0x0040070C 338#define NV04_PGRAPH_SURFACE 0x0040070C
diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c
index af203cc5d7ad..82b58188398b 100644
--- a/drivers/gpu/drm/nouveau/nouveau_state.c
+++ b/drivers/gpu/drm/nouveau/nouveau_state.c
@@ -1105,7 +1105,13 @@ bool nouveau_wait_until(struct drm_device *dev, uint64_t timeout,
1105/* Waits for PGRAPH to go completely idle */ 1105/* Waits for PGRAPH to go completely idle */
1106bool nouveau_wait_for_idle(struct drm_device *dev) 1106bool nouveau_wait_for_idle(struct drm_device *dev)
1107{ 1107{
1108 if (!nv_wait(dev, NV04_PGRAPH_STATUS, 0xffffffff, 0x00000000)) { 1108 struct drm_nouveau_private *dev_priv = dev->dev_private;
1109 uint32_t mask = ~0;
1110
1111 if (dev_priv->card_type == NV_40)
1112 mask &= ~NV40_PGRAPH_STATUS_SYNC_STALL;
1113
1114 if (!nv_wait(dev, NV04_PGRAPH_STATUS, mask, 0)) {
1109 NV_ERROR(dev, "PGRAPH idle timed out with status 0x%08x\n", 1115 NV_ERROR(dev, "PGRAPH idle timed out with status 0x%08x\n",
1110 nv_rd32(dev, NV04_PGRAPH_STATUS)); 1116 nv_rd32(dev, NV04_PGRAPH_STATUS));
1111 return false; 1117 return false;