17e6fb56fSmrg/* 27e6fb56fSmrg * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved. 37e6fb56fSmrg * Copyright 2001-2003 S3 Graphics, Inc. All Rights Reserved. 47e6fb56fSmrg * 57e6fb56fSmrg * Permission is hereby granted, free of charge, to any person obtaining a 67e6fb56fSmrg * copy of this software and associated documentation files (the "Software"), 77e6fb56fSmrg * to deal in the Software without restriction, including without limitation 87e6fb56fSmrg * the rights to use, copy, modify, merge, publish, distribute, sub license, 97e6fb56fSmrg * and/or sell copies of the Software, and to permit persons to whom the 107e6fb56fSmrg * Software is furnished to do so, subject to the following conditions: 117e6fb56fSmrg * 127e6fb56fSmrg * The above copyright notice and this permission notice (including the 137e6fb56fSmrg * next paragraph) shall be included in all copies or substantial portions 147e6fb56fSmrg * 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 NON-INFRINGEMENT. IN NO EVENT SHALL 197e6fb56fSmrg * THE AUTHORS OR COPYRIGHT HOLDERS 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 * Keep this file in perfect sync between the ddx and dri drivers. 267e6fb56fSmrg * At least bump the VIA_DRIDDX_VERSION defines appropriately. 277e6fb56fSmrg * 287e6fb56fSmrg */ 297e6fb56fSmrg#ifndef _VIA_DRI_H_ 307e6fb56fSmrg#define _VIA_DRI_H_ 1 317e6fb56fSmrg 327e6fb56fSmrg#define VIA_MAX_DRAWABLES 256 337e6fb56fSmrg 347e6fb56fSmrg#define VIA_DRIDDX_VERSION_MAJOR 5 357e6fb56fSmrg#define VIA_DRIDDX_VERSION_MINOR 0 367e6fb56fSmrg#define VIA_DRIDDX_VERSION_PATCH 0 377e6fb56fSmrg 387e6fb56fSmrg#if !defined(XFree86Server) && !defined(_XDEFS_H) 397e6fb56fSmrgtypedef int Bool; 407e6fb56fSmrg#endif 417e6fb56fSmrg 427e6fb56fSmrgtypedef struct { 437e6fb56fSmrg drm_handle_t handle; 447e6fb56fSmrg drmSize size; 457e6fb56fSmrg} viaRegion, *viaRegionPtr; 467e6fb56fSmrg 477e6fb56fSmrgtypedef struct { 4890b17f1bSmrg viaRegion regs; 497e6fb56fSmrg int deviceID; 507e6fb56fSmrg int width; 517e6fb56fSmrg int height; 527e6fb56fSmrg int mem; 537e6fb56fSmrg int bytesPerPixel; 547e6fb56fSmrg int priv1; 557e6fb56fSmrg int priv2; 567e6fb56fSmrg Bool drixinerama; 577e6fb56fSmrg int backOffset; 587e6fb56fSmrg int depthOffset; 597e6fb56fSmrg int textureOffset; 607e6fb56fSmrg int textureSize; 617e6fb56fSmrg int irqEnabled; 627e6fb56fSmrg unsigned int scrnX, scrnY; 637e6fb56fSmrg int sarea_priv_offset; 647e6fb56fSmrg int ringBufActive; 657e6fb56fSmrg unsigned int reg_pause_addr; 667e6fb56fSmrg} VIADRIRec, *VIADRIPtr; 677e6fb56fSmrg 687e6fb56fSmrgtypedef struct { 697e6fb56fSmrg int dummy; 707e6fb56fSmrg} VIAConfigPrivRec, *VIAConfigPrivPtr; 717e6fb56fSmrg 727e6fb56fSmrgtypedef struct { 737e6fb56fSmrg int dummy; 747e6fb56fSmrg} VIADRIContextRec, *VIADRIContextPtr; 757e6fb56fSmrg 7690b17f1bSmrgBool VIADRIKernelInit(ScrnInfoPtr pScrn); 7790b17f1bSmrgvoid kickVblank(ScrnInfoPtr pScrn); 7890b17f1bSmrg 797e6fb56fSmrg#endif /* _VIA_DRI_H_ */ 80