1/* 2 * Copyright 2000 ATI Technologies Inc., Markham, Ontario, 3 * VA Linux Systems Inc., Fremont, California. 4 * 5 * All Rights Reserved. 6 * 7 * Permission is hereby granted, free of charge, to any person obtaining 8 * a copy of this software and associated documentation files (the 9 * "Software"), to deal in the Software without restriction, including 10 * without limitation on the rights to use, copy, modify, merge, 11 * publish, distribute, sublicense, and/or sell copies of the Software, 12 * and to permit persons to whom the Software is furnished to do so, 13 * subject to the following conditions: 14 * 15 * The above copyright notice and this permission notice (including the 16 * next paragraph) shall be included in all copies or substantial 17 * portions of the Software. 18 * 19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 * NON-INFRINGEMENT. IN NO EVENT SHALL ATI, VA LINUX SYSTEMS AND/OR 23 * THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 25 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 26 * DEALINGS IN THE SOFTWARE. 27 */ 28 29/* 30 * Authors: 31 * Kevin E. Martin <martin@xfree86.org> 32 * Rickard E. Faith <faith@valinux.com> 33 * 34 */ 35 36#ifndef _RADEON_DRI_ 37#define _RADEON_DRI_ 38 39#include "xf86drm.h" 40 41/* DRI Driver defaults */ 42#define RADEON_DEFAULT_GART_SIZE 8 /* MB (must be 2^n and > 4MB) */ 43#define R300_DEFAULT_GART_SIZE 32 /* MB (for R300 and above) */ 44#define RADEON_DEFAULT_RING_SIZE 1 /* MB (must be page aligned) */ 45#define RADEON_DEFAULT_BUFFER_SIZE 2 /* MB (must be page aligned) */ 46#define RADEON_DEFAULT_GART_TEX_SIZE 1 /* MB (must be page aligned) */ 47 48#define RADEON_DEFAULT_CP_TIMEOUT 100000 /* usecs */ 49 50#define RADEON_DEFAULT_PCI_APER_SIZE 32 /* in MB */ 51 52#define RADEON_CARD_TYPE_RADEON 1 53 54typedef struct { 55 /* DRI screen private data */ 56 int deviceID; /* PCI device ID */ 57 int width; /* Width in pixels of display */ 58 int height; /* Height in scanlines of display */ 59 int depth; /* Depth of display (8, 15, 16, 24) */ 60 int bpp; /* Bit depth of display (8, 16, 24, 32) */ 61 62 int IsPCI; /* Current card is a PCI card */ 63 int AGPMode; 64 65 int frontOffset; /* Start of front buffer */ 66 int frontPitch; 67 int backOffset; /* Start of shared back buffer */ 68 int backPitch; 69 int depthOffset; /* Start of shared depth buffer */ 70 int depthPitch; 71 int textureOffset;/* Start of texture data in frame buffer */ 72 int textureSize; 73 int log2TexGran; 74 75 /* MMIO register data */ 76 drm_handle_t registerHandle; 77 drmSize registerSize; 78 79 /* CP in-memory status information */ 80 drm_handle_t statusHandle; 81 drmSize statusSize; 82 83 /* CP GART Texture data */ 84 drm_handle_t gartTexHandle; 85 drmSize gartTexMapSize; 86 int log2GARTTexGran; 87 int gartTexOffset; 88 unsigned int sarea_priv_offset; 89} RADEONDRIRec, *RADEONDRIPtr; 90 91#endif 92