aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Lespiau2014-11-15 00:09:24 -0600
committersrinivas pulukuru2015-01-30 16:04:01 -0600
commitc0eab7399e0e903d23ef1130e4094f7cabbd5b67 (patch)
treef61eb1d5207c6bd5e1dee4f7cb36dfd9de582628
parent5f5fbf49b6baef5996f2cc4ce85175c091083e60 (diff)
downloadlibdrm-c0eab7399e0e903d23ef1130e4094f7cabbd5b67.tar.gz
libdrm-c0eab7399e0e903d23ef1130e4094f7cabbd5b67.tar.xz
libdrm-c0eab7399e0e903d23ef1130e4094f7cabbd5b67.zip
drm: Introduce a drmSetClientCap() wrapper
That wraps around the new DRM_SET_CLIENT_CAP ioctl. v2: SET_CAP -> SET_CLIENT_CAP renaming Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Signed-off-by: srinivas pulukuru <srinivas.pulukuru@ti.com>
-rw-r--r--xf86drm.c7
-rw-r--r--xf86drm.h2
2 files changed, 9 insertions, 0 deletions
diff --git a/xf86drm.c b/xf86drm.c
index 4791a053..720952ff 100644
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -823,6 +823,13 @@ int drmGetCap(int fd, uint64_t capability, uint64_t *value)
823 return 0; 823 return 0;
824} 824}
825 825
826int drmSetClientCap(int fd, uint64_t capability, uint64_t value)
827{
828 struct drm_set_client_cap cap = { capability, value };
829
830 return drmIoctl(fd, DRM_IOCTL_SET_CLIENT_CAP, &cap);
831}
832
826/** 833/**
827 * Free the bus ID information. 834 * Free the bus ID information.
828 * 835 *
diff --git a/xf86drm.h b/xf86drm.h
index ad9653e4..9c1bd593 100644
--- a/xf86drm.h
+++ b/xf86drm.h
@@ -609,6 +609,8 @@ extern int drmUpdateDrawableInfo(int fd, drm_drawable_t handle,
609 unsigned int num, void *data); 609 unsigned int num, void *data);
610extern int drmCtlInstHandler(int fd, int irq); 610extern int drmCtlInstHandler(int fd, int irq);
611extern int drmCtlUninstHandler(int fd); 611extern int drmCtlUninstHandler(int fd);
612extern int drmSetClientCap(int fd, uint64_t capability,
613 uint64_t value);
612 614
613/* General user-level programmer's API: authenticated client and/or X */ 615/* General user-level programmer's API: authenticated client and/or X */
614extern int drmMap(int fd, 616extern int drmMap(int fd,