summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/nouveau
diff options
context:
space:
mode:
authorBen Skeggs <darktama@iinet.net.au>2006-12-26 21:33:58 +1100
committerBen Skeggs <darktama@iinet.net.au>2006-12-26 21:36:15 +1100
commit3fcb7d388d71c6ab147769d35feab29b7f511521 (patch)
treec73d6cc436b0f4614266e053ff50f4e4df096d7b /src/mesa/drivers/dri/nouveau
parent0b2b2de6cff23bc224f5471cc8d0812661a0d363 (diff)
nouveau: Make the notifier stuff actually work..
Diffstat (limited to 'src/mesa/drivers/dri/nouveau')
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_sync.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_sync.c b/src/mesa/drivers/dri/nouveau/nouveau_sync.c
index 5c1c030913..e27101d868 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_sync.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_sync.c
@@ -18,7 +18,10 @@ nouveau_notifier_new(GLcontext *ctx, GLuint handle)
if (!notifier)
return NULL;
- notifier->mem = nouveau_mem_alloc(ctx, NOUVEAU_MEM_FB, 32, 0);
+ notifier->mem = nouveau_mem_alloc(ctx,
+ NOUVEAU_MEM_FB | NOUVEAU_MEM_MAPPED,
+ 32,
+ 0);
if (!notifier->mem) {
FREE(notifier);
return NULL;
@@ -65,14 +68,14 @@ nouveau_notifier_wait_status(nouveau_notifier *notifier, GLuint status,
unsigned int time = 0;
while (time <= timeout) {
- if (n[NV_NOTIFY_STATE] & NV_NOTIFY_STATE_ERROR_CODE_MASK) {
+ if (n[NV_NOTIFY_STATE/4] & NV_NOTIFY_STATE_ERROR_CODE_MASK) {
MESSAGE("Notifier returned error: 0x%04x\n",
n[NV_NOTIFY_STATE] &
NV_NOTIFY_STATE_ERROR_CODE_MASK);
return GL_FALSE;
}
- if (((n[NV_NOTIFY_STATE] & NV_NOTIFY_STATE_STATUS_MASK) >>
+ if (((n[NV_NOTIFY_STATE/4] & NV_NOTIFY_STATE_STATUS_MASK) >>
NV_NOTIFY_STATE_STATUS_SHIFT) == status)
return GL_TRUE;
@@ -99,11 +102,12 @@ nouveau_notifier_wait_nop(GLcontext *ctx, nouveau_notifier *notifier,
OUT_RING (NV_NOTIFY_STYLE_WRITE_ONLY);
BEGIN_RING_SIZE(subc, NV_NOP, 1);
OUT_RING (0);
+ FIRE_RING();
ret = nouveau_notifier_wait_status(notifier,
NV_NOTIFY_STATE_STATUS_COMPLETED,
0 /* no timeout */);
- if (ret) MESSAGE("wait on notifier failed\n");
+ if (ret == GL_FALSE) MESSAGE("wait on notifier failed\n");
}
GLboolean nouveauSyncInitFuncs(GLcontext *ctx)