17e6fb56fSmrg/***************************************************************************** 27e6fb56fSmrg * VIA Unichrome XvMC extension X server driver. 37e6fb56fSmrg * 47e6fb56fSmrg * Copyright (c) 2004 The Unichrome project. All rights reserved. 57e6fb56fSmrg * 67e6fb56fSmrg * Permission is hereby granted, free of charge, to any person obtaining a 77e6fb56fSmrg * copy of this software and associated documentation files (the "Software"), 87e6fb56fSmrg * to deal in the Software without restriction, including without limitation 97e6fb56fSmrg * the rights to use, copy, modify, merge, publish, distribute, sublicense, 107e6fb56fSmrg * and/or sell copies of the Software, and to permit persons to whom the 117e6fb56fSmrg * Software is furnished to do so, subject to the following conditions: 127e6fb56fSmrg * 137e6fb56fSmrg * The above copyright notice and this permission notice shall be included in 147e6fb56fSmrg * all copies or substantial portions of the Software. 157e6fb56fSmrg * 167e6fb56fSmrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 177e6fb56fSmrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 187e6fb56fSmrg * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 197e6fb56fSmrg * AUTHOR(S) OR COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 207e6fb56fSmrg * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 217e6fb56fSmrg * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 227e6fb56fSmrg * DEALINGS IN THE SOFTWARE. 237e6fb56fSmrg * 247e6fb56fSmrg */ 257e6fb56fSmrg 267e6fb56fSmrg#ifndef _VIA_XVMC_H 277e6fb56fSmrg#define _VIA_XVMC_H 1 287e6fb56fSmrg 2990b17f1bSmrg#include "via_drmclient.h" 307e6fb56fSmrg#include "via_drm.h" 317e6fb56fSmrg 327e6fb56fSmrg/* 3390b17f1bSmrg * This file contains the common definitions between the XvMC lib and the 3490b17f1bSmrg * X server side. It is referenced also by the XvMC lib. Make sure any 357e6fb56fSmrg * structure change is reflected also in a change in minor version number!! 367e6fb56fSmrg */ 377e6fb56fSmrg 387e6fb56fSmrg#define VIAXVMC_MAJOR 0 397e6fb56fSmrg#define VIAXVMC_MINOR 10 407e6fb56fSmrg#define VIAXVMC_PL 0 417e6fb56fSmrg#define VIA_NUM_XVMC_ATTRIBUTES 6 427e6fb56fSmrg#define VIA_XVMC_VALID 0x80000000 437e6fb56fSmrg 447e6fb56fSmrg/* 457e6fb56fSmrg * Commands that client submits through XvPutImage: 467e6fb56fSmrg */ 477e6fb56fSmrg 487e6fb56fSmrg#define VIA_XVMC_COMMAND_FDISPLAY 0 497e6fb56fSmrg#define VIA_XVMC_COMMAND_DISPLAY 1 507e6fb56fSmrg#define VIA_XVMC_COMMAND_UNDISPLAY 2 517e6fb56fSmrg#define VIA_XVMC_COMMAND_ATTRIBUTES 3 527e6fb56fSmrg 537e6fb56fSmrgtypedef drm_via_sarea_t ViaXvMCSAreaPriv; 547e6fb56fSmrg 557e6fb56fSmrgtypedef struct 567e6fb56fSmrg{ 577e6fb56fSmrg INT32 attribute; 587e6fb56fSmrg INT32 value; 597e6fb56fSmrg} ViaAttrPair; 607e6fb56fSmrg 617e6fb56fSmrgtypedef struct 627e6fb56fSmrg{ 637e6fb56fSmrg unsigned numAttr; 647e6fb56fSmrg ViaAttrPair attributes[VIA_NUM_XVMC_ATTRIBUTES]; 657e6fb56fSmrg} ViaXvMCAttrHolder; 667e6fb56fSmrg 677e6fb56fSmrg/* 687e6fb56fSmrg * Passed from client to X server during overlay updates. 697e6fb56fSmrg */ 707e6fb56fSmrg 717e6fb56fSmrgtypedef struct 727e6fb56fSmrg{ 737e6fb56fSmrg unsigned command; 747e6fb56fSmrg unsigned ctxNo; 757e6fb56fSmrg unsigned srfNo; 767e6fb56fSmrg unsigned subPicNo; 777e6fb56fSmrg ViaXvMCAttrHolder attrib; 787e6fb56fSmrg unsigned pad; 797e6fb56fSmrg} ViaXvMCCommandBuffer; 807e6fb56fSmrg 817e6fb56fSmrg/* 827e6fb56fSmrg * Passed from X server to client at context creation. 837e6fb56fSmrg */ 847e6fb56fSmrg 857e6fb56fSmrgtypedef struct 867e6fb56fSmrg{ 877e6fb56fSmrg unsigned int ctxNo; 887e6fb56fSmrg unsigned int major, minor, pl; 897e6fb56fSmrg unsigned xvmc_port; 907e6fb56fSmrg unsigned int fbOffset; 917e6fb56fSmrg unsigned int fbSize; 927e6fb56fSmrg unsigned int mmioOffset; 937e6fb56fSmrg unsigned int mmioSize; 947e6fb56fSmrg unsigned int sAreaSize; 957e6fb56fSmrg unsigned int sAreaPrivOffset; 967e6fb56fSmrg ViaXvMCAttrHolder initAttrs; 977e6fb56fSmrg int useAGP; 987e6fb56fSmrg unsigned int chipId; 997e6fb56fSmrg unsigned int screen; 1007e6fb56fSmrg unsigned int depth; 1017e6fb56fSmrg unsigned int stride; 1027e6fb56fSmrg unsigned int pad; 1037e6fb56fSmrg} ViaXvMCCreateContextRec; 1047e6fb56fSmrg 1057e6fb56fSmrg#endif 106