diff options
author | Dave Airlie <airlied@panoply-rh.(none)> | 2008-03-17 16:37:46 +1000 |
---|---|---|
committer | Dave Airlie <airlied@panoply-rh.(none)> | 2008-03-17 16:38:20 +1000 |
commit | 607964ed9e5f6d86a0960bef2341e7f5de9c71da (patch) | |
tree | 2fa0f3ff0bc57846eded35c4b76e92c08dbec7c5 /libdrm | |
parent | 2d0411cb7544ea45b5879d4f454cb9ee3c9ff5fb (diff) |
drm: add master set/drop protocol
this may not survive long - just need something for testing
Diffstat (limited to 'libdrm')
-rw-r--r-- | libdrm/xf86drm.c | 17 | ||||
-rw-r--r-- | libdrm/xf86drm.h | 3 |
2 files changed, 20 insertions, 0 deletions
diff --git a/libdrm/xf86drm.c b/libdrm/xf86drm.c index bcf562d5..53275f52 100644 --- a/libdrm/xf86drm.c +++ b/libdrm/xf86drm.c @@ -2977,3 +2977,20 @@ void drmCloseOnce(int fd) } } } + +int drmSetMaster(int fd) +{ + int ret; + + fprintf(stderr,"Setting master \n"); + ret = ioctl(fd, DRM_IOCTL_SET_MASTER, 0); + return ret; +} + +int drmDropMaster(int fd) +{ + int ret; + fprintf(stderr,"Dropping master \n"); + ret = ioctl(fd, DRM_IOCTL_DROP_MASTER, 0); + return ret; +} diff --git a/libdrm/xf86drm.h b/libdrm/xf86drm.h index 7b418604..35780aca 100644 --- a/libdrm/xf86drm.h +++ b/libdrm/xf86drm.h @@ -660,6 +660,9 @@ extern int drmSLLookupNeighbors(void *l, unsigned long key, extern int drmOpenOnce(void *unused, const char *BusID, int *newlyopened); extern void drmCloseOnce(int fd); +extern int drmSetMaster(int fd); +extern int drmDropMaster(int fd); + #include "xf86mm.h" #endif |