summaryrefslogtreecommitdiff
path: root/libdrm
diff options
context:
space:
mode:
authorMichel Dänzer <michel@tungstengraphics.com>2006-08-22 16:40:07 +0200
committerMichel Dänzer <michel@tungstengraphics.com>2006-09-28 15:41:35 +0200
commit29598e5253ff5c085ccf63580fd24b84db848424 (patch)
tree6dd3866b32161f16130d962ff5717980bb557029 /libdrm
parentd817cc1f30060fcc4a85a05b2de8a2a1687421b5 (diff)
Add support for tracking drawable information to core
Actually make the existing ioctls for adding and removing drawables do something useful, and add another ioctl for the X server to update drawable information. The only kind of drawable information tracked so far is cliprects.
Diffstat (limited to 'libdrm')
-rw-r--r--libdrm/xf86drm.c16
-rw-r--r--libdrm/xf86drm.h3
2 files changed, 19 insertions, 0 deletions
diff --git a/libdrm/xf86drm.c b/libdrm/xf86drm.c
index c9f1b2db..d4f80b4e 100644
--- a/libdrm/xf86drm.c
+++ b/libdrm/xf86drm.c
@@ -1397,6 +1397,22 @@ int drmDestroyDrawable(int fd, drm_drawable_t handle)
return 0;
}
+int drmUpdateDrawableInfo(int fd, drm_drawable_t handle,
+ drm_drawable_info_type_t type, unsigned int num,
+ void *data)
+{
+ drm_update_draw_t update;
+
+ update.handle = handle;
+ update.type = type;
+ update.num = num;
+ update.data = (unsigned long long)(unsigned long)data;
+
+ if (ioctl(fd, DRM_IOCTL_UPDATE_DRAW, &update)) return -errno;
+
+ return 0;
+}
+
/**
* Acquire the AGP device.
*
diff --git a/libdrm/xf86drm.h b/libdrm/xf86drm.h
index 48a18f29..9e71eb65 100644
--- a/libdrm/xf86drm.h
+++ b/libdrm/xf86drm.h
@@ -544,6 +544,9 @@ extern int drmSwitchToContext(int fd, drm_context_t context);
extern int drmDestroyContext(int fd, drm_context_t handle);
extern int drmCreateDrawable(int fd, drm_drawable_t * handle);
extern int drmDestroyDrawable(int fd, drm_drawable_t handle);
+extern int drmUpdateDrawableInfo(int fd, drm_drawable_t handle,
+ drm_drawable_info_type_t type,
+ unsigned int num, void *data);
extern int drmCtlInstHandler(int fd, int irq);
extern int drmCtlUninstHandler(int fd);