2 * Copyright 1998-2003 VIA Technologies, Inc. All Rights Reserved.
3 * Copyright 2001-2003 S3 Graphics, Inc. All Rights Reserved.
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, sub license,
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:
12 * The above copyright notice and this permission notice (including the
13 * next paragraph) shall be included in all copies or substantial portions
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 NON-INFRINGEMENT. IN NO EVENT SHALL
19 * VIA, S3 GRAPHICS, AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
20 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
24 #ifndef __SAVAGE_DRV_H__
25 #define __SAVAGE_DRV_H__
27 /* these chip tags should match the ones in the 2D driver in savage_regs.h. */
41 extern int savage_preinit(drm_device_t * dev, unsigned long chipset);
43 #define S3_SAVAGE3D_SERIES(chip) ((chip>=S3_SAVAGE3D) && (chip<=S3_SAVAGE_MX))
45 #define S3_SAVAGE4_SERIES(chip) ((chip==S3_SAVAGE4) \
46 || (chip==S3_PROSAVAGE) \
47 || (chip==S3_TWISTER) \
48 || (chip==S3_PROSAVAGEDDR))
50 #define S3_SAVAGE_MOBILE_SERIES(chip) ((chip==S3_SAVAGE_MX) || (chip==S3_SUPERSAVAGE))
52 #define S3_SAVAGE_SERIES(chip) ((chip>=S3_SAVAGE3D) && (chip<=S3_SAVAGE2000))
54 #define S3_MOBILE_TWISTER_SERIES(chip) ((chip==S3_TWISTER) \
55 ||(chip==S3_PROSAVAGEDDR))
58 #define SAVAGE_IS_AGP 1
60 typedef struct drm_savage_private {
61 drm_savage_sarea_t *sarea_priv;
63 enum savage_family chipset;
66 } drm_savage_private_t;
68 #define SAVAGE_FB_SIZE_S3 0x01000000 /* 16MB */
69 #define SAVAGE_FB_SIZE_S4 0x02000000 /* 32MB */
70 #define SAVAGE_MMIO_SIZE 0x00080000 /* 512kB */
71 #define SAVAGE_APERTURE_OFFSET 0x02000000 /* 32MB */
72 #define SAVAGE_APERTURE_SIZE 0x05000000 /* 5 tiled surfaces, 16MB each */
74 #endif /* end #ifndef __SAVAGE_DRV_ */