diff options
author | Jonathan Gray <jsg@jsg.id.au> | 2013-06-30 19:37:45 +1000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-06-30 11:32:24 +0100 |
commit | f8738d7b4cc1c624d4390ef9ce7426ba457d7dd3 (patch) | |
tree | 84d058d76179c18794f05ad7a3fab6d5d52ba1b8 | |
parent | 40301e6d03f6e8d2d2d01e6bb9f1754a7e543a08 (diff) |
intel: replace direct ioctl use with drm{Set, Drop}Master
Use drmSetMaster/drmDropMaster instead of calling the ioctls
directly. Fixes compilation on OpenBSD where these ioctls
aren't defined.
Signed-off-by: Jonathan Gray <jsg@jsg.id.au>
-rw-r--r-- | src/intel_device.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/intel_device.c b/src/intel_device.c index 5c369351..cb48c34a 100644 --- a/src/intel_device.c +++ b/src/intel_device.c @@ -222,7 +222,7 @@ int intel_get_master(ScrnInfoPtr scrn) int retry = 2000; do { - ret = ioctl(dev->fd, DRM_IOCTL_SET_MASTER); + ret = drmSetMaster(dev->fd); if (ret == 0) break; usleep(1000); @@ -242,8 +242,8 @@ int intel_put_master(ScrnInfoPtr scrn) ret = 0; assert(dev->master_count); if (--dev->master_count == 0) { - assert(ioctl(dev->fd, DRM_IOCTL_SET_MASTER) == 0); - ret = ioctl(dev->fd, DRM_IOCTL_DROP_MASTER); + assert(drmSetMaster(dev->fd) == 0); + ret = drmDropMaster(dev->fd); } return ret; |