diff options
Diffstat (limited to 'libdrm')
-rw-r--r-- | libdrm/xf86drm.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libdrm/xf86drm.c b/libdrm/xf86drm.c index 9cc83a275..b5375ee55 100644 --- a/libdrm/xf86drm.c +++ b/libdrm/xf86drm.c @@ -1381,7 +1381,8 @@ int drmCommandRead(int fd, unsigned long drmCommandIndex, { unsigned long request; - request = DRM_IOR( DRM_COMMAND_BASE + drmCommandIndex, size); + request = DRM_IOC( DRM_IOC_READ, DRM_IOCTL_BASE, + DRM_COMMAND_BASE + drmCommandIndex, size); if (ioctl(fd, request, data)) { return -errno; @@ -1394,7 +1395,8 @@ int drmCommandWrite(int fd, unsigned long drmCommandIndex, { unsigned long request; - request = DRM_IOW( DRM_COMMAND_BASE + drmCommandIndex, size); + request = DRM_IOC( DRM_IOC_WRITE, DRM_IOCTL_BASE, + DRM_COMMAND_BASE + drmCommandIndex, size); if (ioctl(fd, request, data)) { return -errno; @@ -1407,7 +1409,8 @@ int drmCommandWriteRead(int fd, unsigned long drmCommandIndex, { unsigned long request; - request = DRM_IOWR( DRM_COMMAND_BASE + drmCommandIndex, size); + request = DRM_IOC( DRM_IOC_READ|DRM_IOC_WRITE, DRM_IOCTL_BASE, + DRM_COMMAND_BASE + drmCommandIndex, size); if (ioctl(fd, request, data)) { return -errno; |