summaryrefslogtreecommitdiff
path: root/libdrm/nouveau/nouveau_channel.c
diff options
context:
space:
mode:
Diffstat (limited to 'libdrm/nouveau/nouveau_channel.c')
-rw-r--r--libdrm/nouveau/nouveau_channel.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libdrm/nouveau/nouveau_channel.c b/libdrm/nouveau/nouveau_channel.c
index e0fb4157..5de27dc8 100644
--- a/libdrm/nouveau/nouveau_channel.c
+++ b/libdrm/nouveau/nouveau_channel.c
@@ -150,6 +150,17 @@ nouveau_channel_free(struct nouveau_channel **chan)
FIRE_RING(&nvchan->base);
+ if (!nvdev->mm_enabled) {
+ struct nouveau_fence *fence = NULL;
+
+ /* Make sure all buffer objects on delayed delete queue
+ * actually get freed.
+ */
+ nouveau_fence_new(&nvchan->base, &fence);
+ nouveau_fence_emit(fence);
+ nouveau_fence_wait(&fence);
+ }
+
if (nvchan->notifier_block)
drmUnmap(nvchan->notifier_block, nvchan->drm.notifier_size);