All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH xf86-video-intel] intel: replace direct ioctl use with drm{Set, Drop}Master
@ 2013-06-30  9:37 Jonathan Gray
  2013-06-30 10:33 ` Chris Wilson
  0 siblings, 1 reply; 2+ messages in thread
From: Jonathan Gray @ 2013-06-30  9:37 UTC (permalink / raw)
  To: intel-gfx

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>
---
 src/intel_device.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git src/intel_device.c src/intel_device.c
index 5c49db0..1b2f33c 100644
--- src/intel_device.c
+++ src/intel_device.c
@@ -202,7 +202,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);
@@ -222,8 +222,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;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH xf86-video-intel] intel: replace direct ioctl use with drm{Set, Drop}Master
  2013-06-30  9:37 [PATCH xf86-video-intel] intel: replace direct ioctl use with drm{Set, Drop}Master Jonathan Gray
@ 2013-06-30 10:33 ` Chris Wilson
  0 siblings, 0 replies; 2+ messages in thread
From: Chris Wilson @ 2013-06-30 10:33 UTC (permalink / raw)
  To: Jonathan Gray; +Cc: intel-gfx

On Sun, Jun 30, 2013 at 07:37:45PM +1000, Jonathan Gray wrote:
> 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>

Sigh. Thanks for the patch, pushed.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-06-30 10:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-30  9:37 [PATCH xf86-video-intel] intel: replace direct ioctl use with drm{Set, Drop}Master Jonathan Gray
2013-06-30 10:33 ` Chris Wilson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.