summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2008-01-09 18:11:04 +1100
committerDave Airlie <airlied@redhat.com>2008-01-09 18:11:04 +1100
commit87a32efcdde124df59656e00a402ba50a0ba1e45 (patch)
treed645fc9d9645cb37c5f1a9cd06459f6b8db599d6
parent73bf5e867089b58b2c4baaa833d15a2b1fb268a4 (diff)
add control node open
-rw-r--r--libdrm/xf86drm.c4
-rw-r--r--libdrm/xf86drm.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/libdrm/xf86drm.c b/libdrm/xf86drm.c
index 2d7d85c1..3cc54f12 100644
--- a/libdrm/xf86drm.c
+++ b/libdrm/xf86drm.c
@@ -579,6 +579,10 @@ int drmOpen(const char *name, const char *busid)
return -1;
}
+int drmOpenControl(int minor)
+{
+ return drmOpenMinor(minor, 0, DRM_NODE_CONTROL);
+}
/**
* Free the version information returned by drmGetVersion().
diff --git a/libdrm/xf86drm.h b/libdrm/xf86drm.h
index d6e98825..7b418604 100644
--- a/libdrm/xf86drm.h
+++ b/libdrm/xf86drm.h
@@ -509,6 +509,7 @@ do { register unsigned int __old __asm("o0"); \
/* General user-level programmer's API: unprivileged */
extern int drmAvailable(void);
extern int drmOpen(const char *name, const char *busid);
+extern int drmOpenControl(int minor);
extern int drmClose(int fd);
extern drmVersionPtr drmGetVersion(int fd);
extern drmVersionPtr drmGetLibVersion(int fd);