From f78d8b45197942fb9e3e17e263160b4b50a862a2 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 6 May 2009 01:18:05 +0100 Subject: Add cmdq+buffer test, and fix for new ioctl definition --- utils.h | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'utils.h') diff --git a/utils.h b/utils.h index 0f19435..8b7430a 100644 --- a/utils.h +++ b/utils.h @@ -26,8 +26,18 @@ #include -#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); -- cgit v1.2.3