From: Jonathan Gray <jsg@jsg.id.au>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH xf86-video-intel] intel: replace direct ioctl use with drm{Set, Drop}Master
Date: Sun, 30 Jun 2013 19:37:45 +1000 [thread overview]
Message-ID: <20130630093745.GA10668@mail.netspace.net.au> (raw)
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
next reply other threads:[~2013-06-30 9:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-30 9:37 Jonathan Gray [this message]
2013-06-30 10:33 ` [PATCH xf86-video-intel] intel: replace direct ioctl use with drm{Set, Drop}Master Chris Wilson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130630093745.GA10668@mail.netspace.net.au \
--to=jsg@jsg.id.au \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.