summaryrefslogtreecommitdiff
path: root/libdrm
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2007-10-09 21:09:31 -0400
committerDave Airlie <airlied@linux.ie>2007-10-16 22:03:05 +1100
commita69c85fec8ed323bffb1324ea08157b3897e97db (patch)
tree8af6864cc448c13e11ee52a5bda8912bbba54e90 /libdrm
parentdccefba71a65566e7e1628b3be67621866000411 (diff)
Drop destroy ioctls for fences and buffer objects.
We now always create a drm_ref_object for user objects and this is then the only things that holds a reference to the user object. This way unreference on will destroy the user object when the last drm_ref_object goes way.
Diffstat (limited to 'libdrm')
-rw-r--r--libdrm/xf86drm.c32
-rw-r--r--libdrm/xf86mm.h2
2 files changed, 0 insertions, 34 deletions
diff --git a/libdrm/xf86drm.c b/libdrm/xf86drm.c
index c450a985..7666d431 100644
--- a/libdrm/xf86drm.c
+++ b/libdrm/xf86drm.c
@@ -2389,18 +2389,6 @@ int drmFenceBuffers(int fd, unsigned flags, uint32_t fence_class, drmFence *fenc
fence->signaled = 0;
return 0;
}
-
-int drmFenceDestroy(int fd, const drmFence *fence)
-{
- drm_fence_arg_t arg;
-
- memset(&arg, 0, sizeof(arg));
- arg.handle = fence->handle;
-
- if (ioctl(fd, DRM_IOCTL_FENCE_DESTROY, &arg))
- return -errno;
- return 0;
-}
int drmFenceReference(int fd, unsigned handle, drmFence *fence)
{
@@ -2732,26 +2720,6 @@ int drmBOCreate(int fd, unsigned long size,
return 0;
}
-int drmBODestroy(int fd, drmBO *buf)
-{
- struct drm_bo_handle_arg arg;
-
- if (buf->mapVirtual) {
- (void) drmUnmap(buf->mapVirtual, buf->start + buf->size);
- buf->mapVirtual = NULL;
- buf->virtual = NULL;
- }
-
- memset(&arg, 0, sizeof(arg));
- arg.handle = buf->handle;
-
- if (ioctl(fd, DRM_IOCTL_BO_DESTROY, &arg))
- return -errno;
-
- buf->handle = 0;
- return 0;
-}
-
int drmBOReference(int fd, unsigned handle, drmBO *buf)
{
struct drm_bo_reference_info_arg arg;
diff --git a/libdrm/xf86mm.h b/libdrm/xf86mm.h
index 0dac7eff..d99e61e7 100644
--- a/libdrm/xf86mm.h
+++ b/libdrm/xf86mm.h
@@ -150,7 +150,6 @@ typedef struct _drmBOList {
extern int drmFenceCreate(int fd, unsigned flags, int fence_class,
unsigned type, drmFence *fence);
-extern int drmFenceDestroy(int fd, const drmFence *fence);
extern int drmFenceReference(int fd, unsigned handle, drmFence *fence);
extern int drmFenceUnreference(int fd, const drmFence *fence);
extern int drmFenceFlush(int fd, drmFence *fence, unsigned flush_type);
@@ -181,7 +180,6 @@ extern int drmBOCreateList(int numTarget, drmBOList *list);
extern int drmBOCreate(int fd, unsigned long size,
unsigned pageAlignment, void *user_buffer,
uint64_t mask, unsigned hint, drmBO *buf);
-extern int drmBODestroy(int fd, drmBO *buf);
extern int drmBOReference(int fd, unsigned handle, drmBO *buf);
extern int drmBOUnReference(int fd, drmBO *buf);
extern int drmBOMap(int fd, drmBO *buf, unsigned mapFlags, unsigned mapHint,