OSDN Git Service

nouveau: Add implicit pushbuf flush before gpuobj destruction.
authorFrancisco Jerez <currojerez@riseup.net>
Sat, 20 Nov 2010 13:32:45 +0000 (14:32 +0100)
committerFrancisco Jerez <currojerez@riseup.net>
Mon, 22 Nov 2010 02:49:41 +0000 (03:49 +0100)
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>
nouveau/nouveau_grobj.c
nouveau/nouveau_notifier.c

index 2b6e53a..df2ffb9 100644 (file)
@@ -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,
index f8cfd8b..513fa63 100644 (file)
@@ -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));