Skip to contentSkip to conversation

libdrm: Unreference pushbuf objects on channel destruction

PATCH In review Krzysztof Smiechowicz 1 participant 1 message Dec 21, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 2/2 libdrm: Unreference pushbuf objects on channel destruction

- unreference pushbuf objects on channel destruction

nouveau_pushbuf.c +6 -0
Index: nouveau/nouveau_pushbuf.c
===================================================================
@@ -262,6 +262,12 @@
  	return 0;
  }
 
+void
+nouveau_pushbuf_fini(struct nouveau_channel *chan)
+{
+	nouveau_pushbuf_fini_call(chan);
+}
+
  int
  nouveau_pushbuf_flush(struct nouveau_channel *chan, unsigned min)
  {
nouveau_private.h +3 -0
Index: nouveau/nouveau_private.h
===================================================================
@@ -65,6 +65,9 @@
  int
  nouveau_pushbuf_init(struct nouveau_channel *);
 
+void
+nouveau_pushbuf_fini(struct nouveau_channel *);
+
  struct nouveau_channel_priv {
  	struct nouveau_channel base;
 
nouveau_channel.c +2 -0
Index: nouveau/nouveau_channel.c
===================================================================
@@ -111,6 +111,8 @@
 
  	FIRE_RING(&nvchan->base);
 
+	nouveau_pushbuf_fini(&nvchan->base);
+
  	nouveau_bo_unmap(nvchan->notifier_bo);
  	nouveau_bo_ref(NULL, &nvchan->notifier_bo);