1/* 2 * SGI Rendering Resource Manager API (?). 3 * 4 * written by Miguel de Icaza (miguel@nuclecu.unam.mx) 5 * 6 * Ok, even if SGI choosed to do mmap trough ioctls, their 7 * kernel support for virtualizing the graphics card is nice. 8 * 9 * We should be able to make graphic applications on Linux 10 * fly. 11 * 12 * This header file should be included from GNU libc as well. 13 */ 14 15 16/* Why like this you say? Well, gdb can print enums */ 17#define RRM_BASE 1000 18#define RRM_CMD_LIMIT (RRM_BASE + 100) 19 20enum { 21 RRM_OPENRN = RRM_BASE, /* open rendering node */ 22 RRM_CLOSERN, 23 RRM_BINDPROCTORN, /* set current rendering region for node */ 24 RRM_BINDRNTOCLIP, 25 RRM_UNBINDRNFROMCLIP, 26 RRM_SWAPBUF, 27 RRM_SETSWAPINTERVAL, 28 RRM_WAITFORRETRACE, 29 RRM_SETDISPLAYMODE, 30 RRM_MESSAGE, 31 RRM_INVALIDATERN, 32 RRM_VALIDATECLIP, 33 RRM_VALIDATESWAPBUF, 34 RRM_SWAPGROUP, 35 RRM_SWAPUNGROUP, 36 RRM_VALIDATEMESSAGE, 37 RRM_GETDISPLAYMODES, 38 RRM_LOADDISPLAYMODE, 39 RRM_CUSHIONBUFFER, 40 RRM_SWAPREADY, 41 RRM_MGR_SWAPBUF, 42 RRM_SETVSYNC, 43 RRM_GETVSYNC, 44 RRM_WAITVSYNC, 45 RRM_BINDRNTOREADANDCLIP, 46 RRM_MAPCLIPTOSWPBUFID 47}; 48 49/* Parameters for the above ioctls 50 * 51 * All of the ioctls take as their first argument the rendering node id. 52 * 53 */ 54 55/* 56 * RRM_OPENRN: 57 * 58 * This is called by the IRIX X server with: 59 * rnid = 0xffffffff rmask = 0 60 * 61 * Returns a number like this: 0x10001. 62 * If you run the X server over and over, you get a value 63 * that is of the form (n * 0x10000) + 1. 64 * 65 * The return value seems to be the RNID. 66 */ 67struct RRM_OpenRN { 68 int rnid; 69 unsigned int rmask; 70}; 71 72struct RRM_CloseRN { 73 int rnid; 74}; 75 76/* 77 * RRM_BINDPROCTORN: 78 * 79 * Return value when the X server calls it: 0 80 */ 81struct RRM_BindProcToRN { 82 int rnid; 83}; 84 85#ifdef __KERNEL__ 86int rrm_command (unsigned int cmd, void *arg); 87int rrm_close (struct inode *inode, struct file *file); 88#endif 89