1 /***************************************************************************** 2 * VIA Unichrome XvMC extension X server driver. 3 * 4 * Copyright (c) 2004 The Unichrome project. All rights reserved. 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a 7 * copy of this software and associated documentation files (the "Software"), 8 * to deal in the Software without restriction, including without limitation 9 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 10 * and/or sell copies of the Software, and to permit persons to whom the 11 * Software is furnished to do so, subject to the following conditions: 12 * 13 * The above copyright notice and this permission notice shall be included in 14 * all copies or substantial portions of the Software. 15 * 16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 * AUTHOR(S) OR COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22 * DEALINGS IN THE SOFTWARE. 23 * 24 */ 25 26 #ifndef _VIA_XVMC_H 27 #define _VIA_XVMC_H 1 28 29 #include "via_drmclient.h" 30 #include "via_drm.h" 31 32 /* 33 * This file contains the common definitions between the XvMC lib and the 34 * X server side. It is referenced also by the XvMC lib. Make sure any 35 * structure change is reflected also in a change in minor version number!! 36 */ 37 38 #define VIAXVMC_MAJOR 0 39 #define VIAXVMC_MINOR 10 40 #define VIAXVMC_PL 0 41 #define VIA_NUM_XVMC_ATTRIBUTES 6 42 #define VIA_XVMC_VALID 0x80000000 43 44 /* 45 * Commands that client submits through XvPutImage: 46 */ 47 48 #define VIA_XVMC_COMMAND_FDISPLAY 0 49 #define VIA_XVMC_COMMAND_DISPLAY 1 50 #define VIA_XVMC_COMMAND_UNDISPLAY 2 51 #define VIA_XVMC_COMMAND_ATTRIBUTES 3 52 53 typedef drm_via_sarea_t ViaXvMCSAreaPriv; 54 55 typedef struct 56 { 57 INT32 attribute; 58 INT32 value; 59 } ViaAttrPair; 60 61 typedef struct 62 { 63 unsigned numAttr; 64 ViaAttrPair attributes[VIA_NUM_XVMC_ATTRIBUTES]; 65 } ViaXvMCAttrHolder; 66 67 /* 68 * Passed from client to X server during overlay updates. 69 */ 70 71 typedef struct 72 { 73 unsigned command; 74 unsigned ctxNo; 75 unsigned srfNo; 76 unsigned subPicNo; 77 ViaXvMCAttrHolder attrib; 78 unsigned pad; 79 } ViaXvMCCommandBuffer; 80 81 /* 82 * Passed from X server to client at context creation. 83 */ 84 85 typedef struct 86 { 87 unsigned int ctxNo; 88 unsigned int major, minor, pl; 89 unsigned xvmc_port; 90 unsigned int fbOffset; 91 unsigned int fbSize; 92 unsigned int mmioOffset; 93 unsigned int mmioSize; 94 unsigned int sAreaSize; 95 unsigned int sAreaPrivOffset; 96 ViaXvMCAttrHolder initAttrs; 97 int useAGP; 98 unsigned int chipId; 99 unsigned int screen; 100 unsigned int depth; 101 unsigned int stride; 102 unsigned int pad; 103 } ViaXvMCCreateContextRec; 104 105 #endif 106