Krzysztof Smiechowicz
2009-Dec-21 14:11 UTC
[Nouveau] [PATCH 2/2] libdrm: Unreference pushbuf objects on channel destruction
- unreference pushbuf objects on channel destruction
Index: nouveau/nouveau_pushbuf.c
==================================================================---
nouveau/nouveau_pushbuf.c (wersja 32082)
+++ nouveau/nouveau_pushbuf.c (kopia robocza)
@@ -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)
{
Index: nouveau/nouveau_private.h
==================================================================---
nouveau/nouveau_private.h (wersja 32082)
+++ nouveau/nouveau_private.h (kopia robocza)
@@ -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;
Index: nouveau/nouveau_channel.c
==================================================================---
nouveau/nouveau_channel.c (wersja 32002)
+++ nouveau/nouveau_channel.c (kopia robocza)
@@ -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);
Krzysztof Smiechowicz
2009-Dec-27 10:02 UTC
[Nouveau] [PATCH 2/2] libdrm: Unreference pushbuf objects on channel destruction
(resending as git patch)
- unreference pushbuf objects on channel destruction
diff --git a/nouveau/nouveau_channel.c b/nouveau/nouveau_channel.c
index 674c5c3..6f71f89 100644
--- a/nouveau/nouveau_channel.c
+++ b/nouveau/nouveau_channel.c
@@ -111,6 +111,8 @@ nouveau_channel_free(struct nouveau_channel **chan)
FIRE_RING(&nvchan->base);
+ nouveau_pushbuf_fini(&nvchan->base);
+
nouveau_bo_unmap(nvchan->notifier_bo);
nouveau_bo_ref(NULL, &nvchan->notifier_bo);
diff --git a/nouveau/nouveau_private.h b/nouveau/nouveau_private.h
index 784afc9..de21a6b 100644
--- a/nouveau/nouveau_private.h
+++ b/nouveau/nouveau_private.h
@@ -65,6 +65,9 @@ struct nouveau_pushbuf_priv {
int
nouveau_pushbuf_init(struct nouveau_channel *);
+void
+nouveau_pushbuf_fini(struct nouveau_channel *);
+
struct nouveau_channel_priv {
struct nouveau_channel base;
diff --git a/nouveau/nouveau_pushbuf.c b/nouveau/nouveau_pushbuf.c
index b90e923..c4053ed 100644
--- a/nouveau/nouveau_pushbuf.c
+++ b/nouveau/nouveau_pushbuf.c
@@ -170,6 +170,12 @@ nouveau_pushbuf_init(struct nouveau_channel *chan)
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)
{
Younes Manton
2009-Dec-28 23:08 UTC
[Nouveau] [PATCH 2/2] libdrm: Unreference pushbuf objects on channel destruction
On Sun, Dec 27, 2009 at 5:02 AM, Krzysztof Smiechowicz <deadwood at wp.pl> wrote:> (resending as git patch) > > - unreference pushbuf objects on channel destruction > > > diff --git a/nouveau/nouveau_channel.c b/nouveau/nouveau_channel.c > index 674c5c3..6f71f89 100644 > --- a/nouveau/nouveau_channel.c > +++ b/nouveau/nouveau_channel.c > @@ -111,6 +111,8 @@ nouveau_channel_free(struct nouveau_channel **chan) > > ? ? ? ?FIRE_RING(&nvchan->base); > > + ? ? ? nouveau_pushbuf_fini(&nvchan->base); > + > ? ? ? ?nouveau_bo_unmap(nvchan->notifier_bo); > ? ? ? ?nouveau_bo_ref(NULL, &nvchan->notifier_bo); > > diff --git a/nouveau/nouveau_private.h b/nouveau/nouveau_private.h > index 784afc9..de21a6b 100644 > --- a/nouveau/nouveau_private.h > +++ b/nouveau/nouveau_private.h > @@ -65,6 +65,9 @@ struct nouveau_pushbuf_priv { > ?int > ?nouveau_pushbuf_init(struct nouveau_channel *); > > +void > +nouveau_pushbuf_fini(struct nouveau_channel *); > + > ?struct nouveau_channel_priv { > ? ? ? ?struct nouveau_channel base; > > diff --git a/nouveau/nouveau_pushbuf.c b/nouveau/nouveau_pushbuf.c > index b90e923..c4053ed 100644 > --- a/nouveau/nouveau_pushbuf.c > +++ b/nouveau/nouveau_pushbuf.c > @@ -170,6 +170,12 @@ nouveau_pushbuf_init(struct nouveau_channel *chan) > ? ? ? ?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) > ?{Pushed both. I had to apply them by hand along with a few minor additions since they would still not apply cleanly. They probably needed a rebase. Thanks.