summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 754655c)
raw | patch | inline | side by side (parent: 754655c)
author | Marcin Slusarz <marcin.slusarz@gmail.com> | |
Tue, 1 May 2012 21:24:45 +0000 (23:24 +0200) | ||
committer | Ben Skeggs <bskeggs@redhat.com> | |
Wed, 2 May 2012 11:21:09 +0000 (21:21 +1000) |
Restore code lost in libdrm_nouveau rewrite.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
nouveau/nouveau.c | patch | blob | history |
diff --git a/nouveau/nouveau.c b/nouveau/nouveau.c
index f0bc2c3f25f79fc31575c8b1c9043f499306062b..5aa41070d582f7f67057f41379b6d7ab7445fd0d 100644 (file)
--- a/nouveau/nouveau.c
+++ b/nouveau/nouveau.c
void
nouveau_object_del(struct nouveau_object **pobj)
{
- struct drm_nouveau_gpuobj_free req;
struct nouveau_object *obj = *pobj;
struct nouveau_device *dev;
if (obj) {
dev = nouveau_object_find(obj, NOUVEAU_DEVICE_CLASS);
- req.channel = obj->parent->handle;
- req.handle = obj->handle;
- drmCommandWrite(dev->fd, DRM_NOUVEAU_GPUOBJ_FREE,
- &req, sizeof(req));
+ if (obj->oclass == NOUVEAU_FIFO_CHANNEL_CLASS) {
+ struct drm_nouveau_channel_free req;
+ req.channel = obj->handle;
+ drmCommandWrite(dev->fd, DRM_NOUVEAU_CHANNEL_FREE,
+ &req, sizeof(req));
+ } else {
+ struct drm_nouveau_gpuobj_free req;
+ req.channel = obj->parent->handle;
+ req.handle = obj->handle;
+ drmCommandWrite(dev->fd, DRM_NOUVEAU_GPUOBJ_FREE,
+ &req, sizeof(req));
+ }
}
free(obj);
*pobj = NULL;