savage_dri.h revision aa9e3350
1ab47cfaaSmrg/*
2ab47cfaaSmrg * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved.
3ab47cfaaSmrg * Copyright 2001-2003 S3 Graphics, Inc. All Rights Reserved.
4ab47cfaaSmrg *
5ab47cfaaSmrg * Permission is hereby granted, free of charge, to any person obtaining a
6ab47cfaaSmrg * copy of this software and associated documentation files (the "Software"),
7ab47cfaaSmrg * to deal in the Software without restriction, including without limitation
8ab47cfaaSmrg * the rights to use, copy, modify, merge, publish, distribute, sub license,
9ab47cfaaSmrg * and/or sell copies of the Software, and to permit persons to whom the
10ab47cfaaSmrg * Software is furnished to do so, subject to the following conditions:
11ab47cfaaSmrg *
12ab47cfaaSmrg * The above copyright notice and this permission notice (including the
13ab47cfaaSmrg * next paragraph) shall be included in all copies or substantial portions
14ab47cfaaSmrg * of the Software.
15ab47cfaaSmrg *
16ab47cfaaSmrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17ab47cfaaSmrg * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18ab47cfaaSmrg * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
19ab47cfaaSmrg * VIA, S3 GRAPHICS, AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20ab47cfaaSmrg * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21ab47cfaaSmrg * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22ab47cfaaSmrg * DEALINGS IN THE SOFTWARE.
23ab47cfaaSmrg */
24ab47cfaaSmrg
25ab47cfaaSmrg
26aa9e3350Smrg#ifndef SAVAGE_DRI_H
27aa9e3350Smrg#define SAVAGE_DRI_H
28ab47cfaaSmrg
29ab47cfaaSmrg#include "drm.h"
30ab47cfaaSmrg
31ab47cfaaSmrgtypedef struct {
32ab47cfaaSmrg   int chipset;
33ab47cfaaSmrg   int width;
34ab47cfaaSmrg   int height;
35ab47cfaaSmrg   int mem;
36ab47cfaaSmrg   int cpp;
37ab47cfaaSmrg   int zpp;
38ab47cfaaSmrg
39ab47cfaaSmrg   int agpMode; /* 0 for PCI cards */
40ab47cfaaSmrg
41ab47cfaaSmrg   unsigned int sarea_priv_offset;
42ab47cfaaSmrg
43ab47cfaaSmrg   unsigned int bufferSize; /* size of DMA buffers */
44ab47cfaaSmrg
45ab47cfaaSmrg   unsigned int frontbufferSize;
46ab47cfaaSmrg   unsigned int frontOffset;
47ab47cfaaSmrg
48ab47cfaaSmrg   unsigned int backbufferSize;
49ab47cfaaSmrg   unsigned int backOffset;
50ab47cfaaSmrg
51ab47cfaaSmrg   unsigned int depthbufferSize;
52ab47cfaaSmrg   unsigned int depthOffset;
53ab47cfaaSmrg
54ab47cfaaSmrg   unsigned int textureOffset;
55ab47cfaaSmrg   unsigned int textureSize;
56ab47cfaaSmrg   int logTextureGranularity;
57ab47cfaaSmrg
58ab47cfaaSmrg   /* Linear aperture */
59ab47cfaaSmrg   drm_handle_t apertureHandle;
60ab47cfaaSmrg   unsigned int apertureSize;
61ab47cfaaSmrg   unsigned int aperturePitch;    /* in byte */
62ab47cfaaSmrg
63ab47cfaaSmrg   /* Status page (probably not needed, but no harm, read-only) */
64ab47cfaaSmrg   drm_handle_t statusHandle;
65ab47cfaaSmrg   unsigned int statusSize;
66ab47cfaaSmrg
67ab47cfaaSmrg   /* AGP textures */
68ab47cfaaSmrg   drm_handle_t agpTextureHandle;
69ab47cfaaSmrg   unsigned int agpTextureSize;
70ab47cfaaSmrg   int logAgpTextureGranularity;
71ab47cfaaSmrg
72ab47cfaaSmrg   /* Not sure about this one */
73ab47cfaaSmrg   drm_handle_t xvmcSurfHandle; /* ? */
74ab47cfaaSmrg} SAVAGEDRIRec, *SAVAGEDRIPtr;
75ab47cfaaSmrg
76aa9e3350Smrg#endif /* SAVAGE_DRI_H */
77