radeon_dri.h revision c06b25594e5effe34a90c067e1a3da0f61cf2b13
1b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell/** 2b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell * \file server/radeon_dri.h 3b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell * \brief Radeon server-side structures. 4b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell * 5b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell * \author Kevin E. Martin <martin@xfree86.org> 6b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell * \author Rickard E. Faith <faith@valinux.com> 7b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell */ 8b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell 9b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell/* 10b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell * Copyright 2000 ATI Technologies Inc., Markham, Ontario, 11b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell * VA Linux Systems Inc., Fremont, California. 12b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell * 13b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell * All Rights Reserved. 14b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell * 15b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell * Permission is hereby granted, free of charge, to any person obtaining 16b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell * a copy of this software and associated documentation files (the 17b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell * "Software"), to deal in the Software without restriction, including 18b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell * without limitation on the rights to use, copy, modify, merge, 19b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell * publish, distribute, sublicense, and/or sell copies of the Software, 20b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell * and to permit persons to whom the Software is furnished to do so, 21b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell * subject to the following conditions: 22b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell * 23b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell * The above copyright notice and this permission notice (including the 24b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell * next paragraph) shall be included in all copies or substantial 25b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell * portions of the Software. 26b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell * 27b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 28b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 29b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 30b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell * NON-INFRINGEMENT. IN NO EVENT SHALL ATI, VA LINUX SYSTEMS AND/OR 31b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell * THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 32b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 33b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 34b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell * DEALINGS IN THE SOFTWARE. 35b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell */ 36b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell 37b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_dri.h,v 1.3 2002/04/24 16:20:40 martin Exp $ */ 38b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell 39b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell#ifndef _RADEON_DRI_ 40b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell#define _RADEON_DRI_ 41b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell 42b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell#include "xf86drm.h" 43ae4a1cc0666860bf5cc37a5cb549afc9aa5448b0Jon Smirl#include "drm.h" 44ae4a1cc0666860bf5cc37a5cb549afc9aa5448b0Jon Smirl#include "radeon_drm.h" 45b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell 46b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell/* DRI Driver defaults */ 47b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell#define RADEON_DEFAULT_CP_PIO_MODE RADEON_CSQ_PRIPIO_INDPIO 48b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell#define RADEON_DEFAULT_CP_BM_MODE RADEON_CSQ_PRIBM_INDBM 49b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell#define RADEON_DEFAULT_AGP_MODE 1 50b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell#define RADEON_DEFAULT_AGP_FAST_WRITE 0 51b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell#define RADEON_DEFAULT_AGP_SIZE 8 /* MB (must be 2^n and > 4MB) */ 52b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell#define RADEON_DEFAULT_RING_SIZE 1 /* MB (must be page aligned) */ 53b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell#define RADEON_DEFAULT_BUFFER_SIZE 2 /* MB (must be page aligned) */ 54b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell#define RADEON_DEFAULT_AGP_TEX_SIZE 1 /* MB (must be page aligned) */ 55b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell#define RADEON_DEFAULT_CP_TIMEOUT 10000 /* usecs */ 56a7abda582082ca345bf1b883cc3c125b3918d5b8Dave Airlie#define RADEON_DEFAULT_PAGE_FLIP 0 /* page flipping diabled */ 57b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell#define RADEON_BUFFER_ALIGN 0x00000fff 58b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell 59b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell/** 60b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell * \brief Radeon DRI driver private data. 61b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell */ 62b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwelltypedef struct { 63b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell /** 64b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell * \name DRI screen private data 65b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell */ 66b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell /*@{*/ 67b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell int deviceID; /**< \brief PCI device ID */ 68b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell int width; /**< \brief width in pixels of display */ 69b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell int height; /**< \brief height in scanlines of display */ 70b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell int depth; /**< \brief depth of display (8, 15, 16, 24) */ 71b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell int bpp; /**< \brief bit depth of display (8, 16, 24, 32) */ 72b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell 73b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell int IsPCI; /**< \brief is current card a PCI card? */ 74b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell int AGPMode; /**< \brief AGP mode */ 75b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell 76b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell int frontOffset; /**< \brief front buffer offset */ 77b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell int frontPitch; /**< \brief front buffer pitch */ 78b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell int backOffset; /**< \brief shared back buffer offset */ 79b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell int backPitch; /**< \brief shared back buffer pitch */ 80b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell int depthOffset; /**< \brief shared depth buffer offset */ 81b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell int depthPitch; /**< \brief shared depth buffer pitch */ 82b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell int textureOffset; /**< \brief start of texture data in frame buffer */ 83b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell int textureSize; /**< \brief size of texture date */ 84b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell int log2TexGran; /**< \brief log2 texture granularity */ 85b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell /*@}*/ 86b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell 87b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell /** 88b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell * \name MMIO register data 89b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell */ 90b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell /*@{*/ 91c06b25594e5effe34a90c067e1a3da0f61cf2b13Ian Romanick drm_handle_t registerHandle; /**< \brief MMIO register map size */ 92b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell drmSize registerSize; /**< \brief MMIO register map handle */ 93b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell /*@}*/ 94b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell 95b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell /** 96b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell * \name CP in-memory status information 97b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell */ 98b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell /*@{*/ 99c06b25594e5effe34a90c067e1a3da0f61cf2b13Ian Romanick drm_handle_t statusHandle; /**< \brief status map handle */ 100b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell drmSize statusSize; /**< \brief status map size */ 101b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell /*@}*/ 102b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell 103b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell /** 104b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell * \name CP AGP Texture data 105b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell */ 106b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell /*@{*/ 107c06b25594e5effe34a90c067e1a3da0f61cf2b13Ian Romanick drm_handle_t gartTexHandle; /**< \brief AGP texture area map handle */ 108bcc6eddd335e97d49ed2ef3a1440f94d58dce12dJon Smirl drmSize gartTexMapSize; /**< \brief AGP texture area map size */ 109bcc6eddd335e97d49ed2ef3a1440f94d58dce12dJon Smirl int log2GARTTexGran; /**< \brief AGP texture granularity in log base 2 */ 110bcc6eddd335e97d49ed2ef3a1440f94d58dce12dJon Smirl int gartTexOffset; /**< \brief AGP texture area offset in AGP space */ 111b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell /*@}*/ 112b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell 113b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell unsigned int sarea_priv_offset; /**< \brief offset of the private SAREA data*/ 114b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell} RADEONDRIRec, *RADEONDRIPtr; 115b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell 116b93652d67ed976562edc121b319b0594f79cc00aKeith Whitwell#endif 117