diff options
author | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2007-11-02 16:03:41 +0100 |
---|---|---|
committer | Thomas Hellstrom <thomas-at-tungstengraphics-dot-com> | 2007-11-02 16:05:25 +0100 |
commit | 94c22c334948a49641f4a1fa84687f992e5cc5cb (patch) | |
tree | 5db99cbd60529f56cf80d63ac6bfbc7eb68f3792 /libdrm | |
parent | c06808fb6521822238bca4574758f30246b71c2d (diff) |
User buffer support.
Diffstat (limited to 'libdrm')
-rw-r--r-- | libdrm/xf86drm.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libdrm/xf86drm.c b/libdrm/xf86drm.c index 5a4071b2..165cb2f9 100644 --- a/libdrm/xf86drm.c +++ b/libdrm/xf86drm.c @@ -2612,9 +2612,9 @@ int drmBOCreate(int fd, unsigned long size, ret = drmIoctlTimeout(fd, DRM_IOCTL_BO_CREATE, &arg); if (ret) return ret; - + drmBOCopyReply(rep, buf); - buf->mapVirtual = NULL; + buf->virtual = user_buffer; buf->mapCount = 0; return 0; @@ -2644,7 +2644,7 @@ int drmBOUnreference(int fd, drmBO *buf) { struct drm_bo_handle_arg arg; - if (buf->mapVirtual) { + if (buf->mapVirtual && buf->mapHandle) { (void) munmap(buf->mapVirtual, buf->start + buf->size); buf->mapVirtual = NULL; buf->virtual = NULL; |