aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancisco Jerez2010-11-20 07:32:45 -0600
committerFrancisco Jerez2010-11-21 20:49:41 -0600
commitd17681d538ce86a3f8d6d1c7407df3ceb2bcc499 (patch)
treeb678024e9286cda48907ef682fbab36bbaff30b6 /nouveau
parent877b2ce15b80975b4dac42657bdfb0a3da833e1c (diff)
downloadlibdrm-d17681d538ce86a3f8d6d1c7407df3ceb2bcc499.tar.gz
libdrm-d17681d538ce86a3f8d6d1c7407df3ceb2bcc499.tar.xz
libdrm-d17681d538ce86a3f8d6d1c7407df3ceb2bcc499.zip
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>
Diffstat (limited to 'nouveau')
-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)
99 if (nvgrobj->base.grclass) { 99 if (nvgrobj->base.grclass) {
100 struct drm_nouveau_gpuobj_free f; 100 struct drm_nouveau_gpuobj_free f;
101 101
102 FIRE_RING(&chan->base);
103
102 f.channel = chan->drm.channel; 104 f.channel = chan->drm.channel;
103 f.handle = nvgrobj->base.handle; 105 f.handle = nvgrobj->base.handle;
104 drmCommandWrite(nvdev->fd, DRM_NOUVEAU_GPUOBJ_FREE, 106 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)
80 nvchan = nouveau_channel(nvnotify->base.channel); 80 nvchan = nouveau_channel(nvnotify->base.channel);
81 nvdev = nouveau_device(nvchan->base.device); 81 nvdev = nouveau_device(nvchan->base.device);
82 82
83 FIRE_RING(&nvchan->base);
84
83 f.channel = nvchan->drm.channel; 85 f.channel = nvchan->drm.channel;
84 f.handle = nvnotify->base.handle; 86 f.handle = nvnotify->base.handle;
85 drmCommandWrite(nvdev->fd, DRM_NOUVEAU_GPUOBJ_FREE, &f, sizeof(f)); 87 drmCommandWrite(nvdev->fd, DRM_NOUVEAU_GPUOBJ_FREE, &f, sizeof(f));