[PATCH libdrm 3/3] drm: Introduce a drmSetCap() wrapper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



That wraps around the new DRM_SET_CAP ioctl.

Signed-off-by: Damien Lespiau <damien.lespiau@xxxxxxxxx>
---
 xf86drm.c | 7 +++++++
 xf86drm.h | 1 +
 2 files changed, 8 insertions(+)

diff --git a/xf86drm.c b/xf86drm.c
index 4791a05..dac6a52 100644
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -823,6 +823,13 @@ int drmGetCap(int fd, uint64_t capability, uint64_t *value)
 	return 0;
 }
 
+int drmSetCap(int fd, uint64_t capability, uint64_t value)
+{
+	struct drm_set_cap cap  = { capability, value };
+
+	return drmIoctl(fd, DRM_IOCTL_SET_CAP, &cap);
+}
+
 /**
  * Free the bus ID information.
  *
diff --git a/xf86drm.h b/xf86drm.h
index 5ecb284..053be08 100644
--- a/xf86drm.h
+++ b/xf86drm.h
@@ -609,6 +609,7 @@ extern int           drmUpdateDrawableInfo(int fd, drm_drawable_t handle,
 					   unsigned int num, void *data);
 extern int           drmCtlInstHandler(int fd, int irq);
 extern int           drmCtlUninstHandler(int fd);
+extern int           drmSetCap(int fd, uint64_t capability, uint64_t value);
 
 /* General user-level programmer's API: authenticated client and/or X */
 extern int           drmMap(int fd,
-- 
1.8.3.1

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux