summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/nouveau/nouveau_sync.c
diff options
context:
space:
mode:
authorBen Skeggs <darktama@iinet.net.au>2006-12-26 21:10:38 +1100
committerBen Skeggs <darktama@iinet.net.au>2006-12-26 21:36:15 +1100
commit0b2b2de6cff23bc224f5471cc8d0812661a0d363 (patch)
tree96894d5975b0df79c07a70347cc7feba4ddf4272 /src/mesa/drivers/dri/nouveau/nouveau_sync.c
parentc0a63d8e5e33b7fe3057e32f04c22969ac2adc1d (diff)
nouveau: Wait on notifier to check for completion of previous commands.
We can't wait on NV_PGRAPH_STATUS. We don't have the regs mapped, and there's no guarantee that we'll catch PGRAPH idle when multiple channels are active.
Diffstat (limited to 'src/mesa/drivers/dri/nouveau/nouveau_sync.c')
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_sync.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_sync.c b/src/mesa/drivers/dri/nouveau/nouveau_sync.c
index 698f778c4b..5c1c030913 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_sync.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_sync.c
@@ -106,10 +106,22 @@ nouveau_notifier_wait_nop(GLcontext *ctx, nouveau_notifier *notifier,
if (ret) MESSAGE("wait on notifier failed\n");
}
-void nouveauSyncInitFuncs(GLcontext *ctx)
+GLboolean nouveauSyncInitFuncs(GLcontext *ctx)
{
nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx);
nmesa->syncNotifier = nouveau_notifier_new(ctx, NvSyncNotify);
+ if (!nmesa->syncNotifier) {
+ MESSAGE("Failed to create channel sync notifier\n");
+ return GL_FALSE;
+ }
+
+ /* 0x180 is SET_DMA_NOTIFY, should be correct for all supported 3D
+ * object classes
+ */
+ BEGIN_RING_CACHE(NvSub3D, 0x180, 1);
+ OUT_RING_CACHE (NvSyncNotify);
+
+ return GL_TRUE;
}