summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nouveau/nouveau_grobj.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/nouveau/nouveau_grobj.c b/nouveau/nouveau_grobj.c
index c6b98f16..36344b99 100644
--- a/nouveau/nouveau_grobj.c
+++ b/nouveau/nouveau_grobj.c
@@ -100,12 +100,13 @@ nouveau_grobj_free(struct nouveau_grobj **grobj)
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,
&f, sizeof(f));
}
+ if (nvgrobj->base.bound != NOUVEAU_GROBJ_UNBOUND)
+ chan->base.subc[nvgrobj->base.subc].gr = NULL;
free(nvgrobj);
}