summaryrefslogtreecommitdiff
path: root/src/via_id.h
blob: 4db321d6c64db20de633efaa6fe48c3a318aff17 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/*
 * Copyright 2004-2005 The Unichrome Project  [unichrome.sf.net]
 *
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sub license,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice (including the
 * next paragraph) shall be included in all copies or substantial portions
 * of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
 * DEALINGS IN THE SOFTWARE.
 */

#ifndef _VIA_ID_H_
#define _VIA_ID_H_ 1

/* Chip tags, used to group the adapters into families. */
enum VIACHIPTAGS {
    VIA_UNKNOWN = 0,
    VIA_CLE266,
    VIA_KM400,
    VIA_K8M800,
    VIA_PM800,
    VIA_VM800,
    VIA_K8M890,
    VIA_P4M900,
    VIA_CX700,
    VIA_P4M890,
    VIA_VX800,
    VIA_VX855,
    VIA_VX900,
    VIA_LAST
};


#define PCI_VIA_VENDOR_ID       0x1106

#define PCI_CHIP_CLE3122        0x3122 /* CLE266 */
#define PCI_CHIP_VT3205         0x7205 /* KM400 */
#define PCI_CHIP_VT3204         0x3108 /* K8M800 */
#define PCI_CHIP_VT3259         0x3118 /* PM800 */
#define PCI_CHIP_VT3314         0x3344 /* VM800 */
#define PCI_CHIP_VT3336         0x3230 /* K8M890 */
#define PCI_CHIP_VT3364         0x3371 /* P4M900 */
#define PCI_CHIP_VT3324         0x3157 /* CX700 */
#define PCI_CHIP_VT3327         0x3343 /* P4M890 */
#define PCI_CHIP_VT3353         0x1122 /* VX800 */
#define PCI_CHIP_VT3409         0x5122 /* VX855/VX875 */
#define PCI_CHIP_VT3410         0x7122 /* VX900 */

/* There is some conflicting information about the two major revisions of
 * the CLE266, often labelled Ax and Cx.  The dividing line seems to be
 * either 0x0f or 0x10. */
#define CLE266_REV_IS_AX(x) ((x) < 0x10)
#define CLE266_REV_IS_CX(x) ((x) >= 0x10)

struct ViaCardIdStruct {
    char*  String;  /* full identification string */
    CARD8  Chip;    /* which family of unichrome */
    CARD16 Vendor;  /* PCI subsystem Vendor ID */
    CARD16 Device;  /* PCI subsystem Device ID */
    CARD8  Outputs; /* whether it supports CRT, LCD, and TV */
};

void ViaDoubleCheckCLE266Revision(ScrnInfoPtr pScrn);
void ViaCheckCardId(ScrnInfoPtr pScrn);

#endif /* _VIA_ID_H_ */