mach64_dri.h revision 32b578d3
1/* 2 * Copyright 2000 Gareth Hughes 3 * All Rights Reserved. 4 * 5 * Permission is hereby granted, free of charge, to any person obtaining a 6 * copy of this software and associated documentation files (the "Software"), 7 * to deal in the Software without restriction, including without limitation 8 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 * and/or sell copies of the Software, and to permit persons to whom the 10 * Software is furnished to do so, subject to the following conditions: 11 * 12 * The above copyright notice and this permission notice (including the next 13 * paragraph) shall be included in all copies or substantial portions of the 14 * 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 19 * GARETH HUGHES BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 20 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 21 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 22 */ 23 24/* 25 * Authors: 26 * Gareth Hughes <gareth@valinux.com> 27 * Leif Delgass <ldelgass@retinalburn.net> 28 */ 29 30#ifndef __MACH64_DRI_H__ 31#define __MACH64_DRI_H__ 1 32 33#include "xf86drm.h" 34 35typedef struct { 36 drm_handle_t fbHandle; 37 38 drm_handle_t regsHandle; 39 drmSize regsSize; 40 41 int IsPCI; 42 43 drm_handle_t agpHandle; /* Handle from drmAgpAlloc */ 44 unsigned long agpOffset; 45 drmSize agpSize; 46 int agpMode; 47 48 /* DMA descriptor ring */ 49 unsigned long ringStart; /* Offset into AGP space */ 50 drm_handle_t ringHandle; /* Handle from drmAddMap */ 51 drmSize ringMapSize; /* Size of map */ 52 int ringSize; /* Size of ring (in kB) */ 53 drmAddress ringMap; /* Map */ 54 55 /* vertex buffer data */ 56 unsigned long bufferStart; /* Offset into AGP space */ 57 drm_handle_t bufferHandle; /* Handle from drmAddMap */ 58 drmSize bufferMapSize; /* Size of map */ 59 int bufferSize; /* Size of buffers (in MB) */ 60 drmAddress bufferMap; /* Map */ 61 62 drmBufMapPtr drmBuffers; /* Buffer map */ 63 int numBuffers; /* Number of buffers */ 64 65 /* AGP Texture data */ 66 unsigned long agpTexStart; /* Offset into AGP space */ 67 drm_handle_t agpTexHandle; /* Handle from drmAddMap */ 68 drmSize agpTexMapSize; /* Size of map */ 69 int agpTexSize; /* Size of AGP tex space (in MB) */ 70 drmAddress agpTexMap; /* Map */ 71 int log2AGPTexGran; 72 73 int fbX; 74 int fbY; 75 int backX; 76 int backY; 77 int depthX; 78 int depthY; 79 80 int frontOffset; 81 int frontPitch; 82 int backOffset; 83 int backPitch; 84 int depthOffset; 85 int depthPitch; 86 87 int textureOffset; 88 int textureSize; 89 int logTextureGranularity; 90} ATIDRIServerInfoRec, *ATIDRIServerInfoPtr; 91 92typedef struct { 93 int chipset; 94 int width; 95 int height; 96 int mem; 97 int cpp; 98 99 int IsPCI; 100 int AGPMode; 101 102 unsigned int frontOffset; 103 unsigned int frontPitch; 104 105 unsigned int backOffset; 106 unsigned int backPitch; 107 108 unsigned int depthOffset; 109 unsigned int depthPitch; 110 111 unsigned int textureOffset; 112 unsigned int textureSize; 113 int logTextureGranularity; 114 115 drm_handle_t regs; 116 drmSize regsSize; 117 118 drm_handle_t agp; 119 drmSize agpSize; 120 unsigned int agpTextureOffset; 121 unsigned int agpTextureSize; 122 int logAgpTextureGranularity; 123} ATIDRIRec, *ATIDRIPtr; 124 125#endif /* __MACH64_DRI_H__ */ 126