summaryrefslogtreecommitdiff
path: root/utils.h
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2009-05-06 01:18:05 +0100
committerThomas White <taw@bitwiz.org.uk>2009-05-06 01:18:05 +0100
commitf78d8b45197942fb9e3e17e263160b4b50a862a2 (patch)
treef43a46a1a18eca29b78ad02bd59cdf46b56b442d /utils.h
parente33e6606ea98abc088310d0b570fabc656c0392f (diff)
Add cmdq+buffer test, and fix for new ioctl definition
Diffstat (limited to 'utils.h')
-rw-r--r--utils.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/utils.h b/utils.h
index 0f19435..8b7430a 100644
--- a/utils.h
+++ b/utils.h
@@ -26,8 +26,18 @@
#include <X11/Xmd.h>
-#define RING_LOCALS int __count = 0;
-#define OUT_REG(reg, val) cmds[__count++] = (reg); cmds[__count++] = (val);
+#define RING_LOCALS int __count = 0; \
+ int __nobjs = 0;
+
+#define OUT_REG(reg, val) cmds[__count++] = (reg); \
+ cmds[__count++] = (val);
+
+#define OUT_REG_BO(reg, bo) objs[__nobjs] = bo; \
+ obj_pos[__nobjs++] = __count; \
+ cmds[__count++] = (reg); \
+ cmds[__count++] = 0x0000; \
+ cmds[__count++] = (reg+2); \
+ cmds[__count++] = 0x0000;
extern int do_drm_authentication(Display *dpy);