summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancisco Jerez <currojerez@riseup.net>2010-11-20 14:32:45 +0100
committerFrancisco Jerez <currojerez@riseup.net>2010-11-22 03:49:41 +0100
commitd17681d538ce86a3f8d6d1c7407df3ceb2bcc499 (patch)
treeb678024e9286cda48907ef682fbab36bbaff30b6
parent877b2ce15b80975b4dac42657bdfb0a3da833e1c (diff)
nouveau: Add implicit pushbuf flush before gpuobj destruction.
It makes sure that GPU object destruction is executed in order with respect to the previous FIFO commands. Signed-off-by: Francisco Jerez <currojerez@riseup.net> Acked-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r--nouveau/nouveau_grobj.c2
-rw-r--r--nouveau/nouveau_notifier.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/nouveau/nouveau_grobj.c b/nouveau/nouveau_grobj.c
index 2b6e53a5..df2ffb91 100644
--- a/nouveau/nouveau_grobj.c
+++ b/nouveau/nouveau_grobj.c
@@ -99,6 +99,8 @@ nouveau_grobj_free(struct nouveau_grobj **grobj)
if (nvgrobj->base.grclass) {
struct drm_nouveau_gpuobj_free f;
+ FIRE_RING(&chan->base);
+
f.channel = chan->drm.channel;
f.handle = nvgrobj->base.handle;
drmCommandWrite(nvdev->fd, DRM_NOUVEAU_GPUOBJ_FREE,
diff --git a/nouveau/nouveau_notifier.c b/nouveau/nouveau_notifier.c
index f8cfd8b9..513fa635 100644
--- a/nouveau/nouveau_notifier.c
+++ b/nouveau/nouveau_notifier.c
@@ -80,6 +80,8 @@ nouveau_notifier_free(struct nouveau_notifier **notifier)
nvchan = nouveau_channel(nvnotify->base.channel);
nvdev = nouveau_device(nvchan->base.device);
+ FIRE_RING(&nvchan->base);
+
f.channel = nvchan->drm.channel;
f.handle = nvnotify->base.handle;
drmCommandWrite(nvdev->fd, DRM_NOUVEAU_GPUOBJ_FREE, &f, sizeof(f));