1428d7b3dSmrg#ifndef INTEL_DRIVER_H
2428d7b3dSmrg#define INTEL_DRIVER_H
3428d7b3dSmrg
4428d7b3dSmrgstruct xf86_platform_device;
5428d7b3dSmrg
6428d7b3dSmrg#define INTEL_VERSION 4000
7428d7b3dSmrg#define INTEL_NAME "intel"
8428d7b3dSmrg#define INTEL_DRIVER_NAME "intel"
9428d7b3dSmrg
10428d7b3dSmrg#define INTEL_VERSION_MAJOR PACKAGE_VERSION_MAJOR
11428d7b3dSmrg#define INTEL_VERSION_MINOR PACKAGE_VERSION_MINOR
12428d7b3dSmrg#define INTEL_VERSION_PATCH PACKAGE_VERSION_PATCHLEVEL
13428d7b3dSmrg
14428d7b3dSmrg#define PCI_CHIP_I810		0x7121
15428d7b3dSmrg#define PCI_CHIP_I810_DC100	0x7123
16428d7b3dSmrg#define PCI_CHIP_I810_E		0x7125
17428d7b3dSmrg#define PCI_CHIP_I815		0x1132
18428d7b3dSmrg
19428d7b3dSmrg#define PCI_CHIP_I830_M		0x3577
20428d7b3dSmrg#define PCI_CHIP_845_G		0x2562
21428d7b3dSmrg#define PCI_CHIP_I854		0x358E
22428d7b3dSmrg#define PCI_CHIP_I855_GM	0x3582
23428d7b3dSmrg#define PCI_CHIP_I865_G		0x2572
24428d7b3dSmrg
25428d7b3dSmrg#define PCI_CHIP_I915_G		0x2582
26428d7b3dSmrg#define PCI_CHIP_I915_GM	0x2592
27428d7b3dSmrg#define PCI_CHIP_E7221_G	0x258A
28428d7b3dSmrg#define PCI_CHIP_I945_G		0x2772
29428d7b3dSmrg#define PCI_CHIP_I945_GM        0x27A2
30428d7b3dSmrg#define PCI_CHIP_I945_GME	0x27AE
31428d7b3dSmrg#define PCI_CHIP_PINEVIEW_M	0xA011
32428d7b3dSmrg#define PCI_CHIP_PINEVIEW_G	0xA001
33428d7b3dSmrg#define PCI_CHIP_Q35_G		0x29B2
34428d7b3dSmrg#define PCI_CHIP_G33_G		0x29C2
35428d7b3dSmrg#define PCI_CHIP_Q33_G		0x29D2
36428d7b3dSmrg
37428d7b3dSmrg#define PCI_CHIP_G35_G		0x2982
38428d7b3dSmrg#define PCI_CHIP_I965_Q		0x2992
39428d7b3dSmrg#define PCI_CHIP_I965_G		0x29A2
40428d7b3dSmrg#define PCI_CHIP_I946_GZ	0x2972
41428d7b3dSmrg#define PCI_CHIP_I965_GM        0x2A02
42428d7b3dSmrg#define PCI_CHIP_I965_GME       0x2A12
43428d7b3dSmrg#define PCI_CHIP_GM45_GM	0x2A42
44428d7b3dSmrg#define PCI_CHIP_G45_E_G	0x2E02
45428d7b3dSmrg#define PCI_CHIP_G45_G		0x2E22
46428d7b3dSmrg#define PCI_CHIP_Q45_G		0x2E12
47428d7b3dSmrg#define PCI_CHIP_G41_G		0x2E32
48428d7b3dSmrg#define PCI_CHIP_B43_G		0x2E42
49428d7b3dSmrg#define PCI_CHIP_B43_G1		0x2E92
50428d7b3dSmrg
51428d7b3dSmrg#define PCI_CHIP_IRONLAKE_D_G		0x0042
52428d7b3dSmrg#define PCI_CHIP_IRONLAKE_M_G		0x0046
53428d7b3dSmrg
54428d7b3dSmrg#define PCI_CHIP_SANDYBRIDGE_GT1	0x0102
55428d7b3dSmrg#define PCI_CHIP_SANDYBRIDGE_GT2	0x0112
56428d7b3dSmrg#define PCI_CHIP_SANDYBRIDGE_GT2_PLUS	0x0122
57428d7b3dSmrg#define PCI_CHIP_SANDYBRIDGE_M_GT1	0x0106
58428d7b3dSmrg#define PCI_CHIP_SANDYBRIDGE_M_GT2	0x0116
59428d7b3dSmrg#define PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS	0x0126
60428d7b3dSmrg#define PCI_CHIP_SANDYBRIDGE_S_GT	0x010A
61428d7b3dSmrg
62428d7b3dSmrg#define PCI_CHIP_IVYBRIDGE_M_GT1	0x0156
63428d7b3dSmrg#define PCI_CHIP_IVYBRIDGE_M_GT2	0x0166
64428d7b3dSmrg#define PCI_CHIP_IVYBRIDGE_D_GT1	0x0152
65428d7b3dSmrg#define PCI_CHIP_IVYBRIDGE_D_GT2	0x0162
66428d7b3dSmrg#define PCI_CHIP_IVYBRIDGE_S_GT1	0x015a
67428d7b3dSmrg#define PCI_CHIP_IVYBRIDGE_S_GT2	0x016a
68428d7b3dSmrg
69428d7b3dSmrg#define PCI_CHIP_HASWELL_D_GT1		0x0402
70428d7b3dSmrg#define PCI_CHIP_HASWELL_D_GT2		0x0412
71428d7b3dSmrg#define PCI_CHIP_HASWELL_D_GT3		0x0422
72428d7b3dSmrg#define PCI_CHIP_HASWELL_M_GT1		0x0406
73428d7b3dSmrg#define PCI_CHIP_HASWELL_M_GT2		0x0416
74428d7b3dSmrg#define PCI_CHIP_HASWELL_M_GT3		0x0426
75428d7b3dSmrg#define PCI_CHIP_HASWELL_S_GT1		0x040A
76428d7b3dSmrg#define PCI_CHIP_HASWELL_S_GT2		0x041A
77428d7b3dSmrg#define PCI_CHIP_HASWELL_S_GT3		0x042A
78428d7b3dSmrg#define PCI_CHIP_HASWELL_B_GT1		0x040B
79428d7b3dSmrg#define PCI_CHIP_HASWELL_B_GT2		0x041B
80428d7b3dSmrg#define PCI_CHIP_HASWELL_B_GT3		0x042B
81428d7b3dSmrg#define PCI_CHIP_HASWELL_E_GT1		0x040E
82428d7b3dSmrg#define PCI_CHIP_HASWELL_E_GT2		0x041E
83428d7b3dSmrg#define PCI_CHIP_HASWELL_E_GT3		0x042E
84428d7b3dSmrg
85428d7b3dSmrg#define PCI_CHIP_HASWELL_ULT_D_GT1	0x0A02
86428d7b3dSmrg#define PCI_CHIP_HASWELL_ULT_D_GT2	0x0A12
87428d7b3dSmrg#define PCI_CHIP_HASWELL_ULT_D_GT3	0x0A22
88428d7b3dSmrg#define PCI_CHIP_HASWELL_ULT_M_GT1	0x0A06
89428d7b3dSmrg#define PCI_CHIP_HASWELL_ULT_M_GT2	0x0A16
90428d7b3dSmrg#define PCI_CHIP_HASWELL_ULT_M_GT3	0x0A26
91428d7b3dSmrg#define PCI_CHIP_HASWELL_ULT_S_GT1	0x0A0A
92428d7b3dSmrg#define PCI_CHIP_HASWELL_ULT_S_GT2	0x0A1A
93428d7b3dSmrg#define PCI_CHIP_HASWELL_ULT_S_GT3	0x0A2A
94428d7b3dSmrg#define PCI_CHIP_HASWELL_ULT_B_GT1	0x0A0B
95428d7b3dSmrg#define PCI_CHIP_HASWELL_ULT_B_GT2	0x0A1B
96428d7b3dSmrg#define PCI_CHIP_HASWELL_ULT_B_GT3	0x0A2B
97428d7b3dSmrg#define PCI_CHIP_HASWELL_ULT_E_GT1	0x0A0E
98428d7b3dSmrg#define PCI_CHIP_HASWELL_ULT_E_GT2	0x0A1E
99428d7b3dSmrg#define PCI_CHIP_HASWELL_ULT_E_GT3	0x0A2E
100428d7b3dSmrg
101428d7b3dSmrg#define PCI_CHIP_HASWELL_CRW_D_GT1	0x0D02
102428d7b3dSmrg#define PCI_CHIP_HASWELL_CRW_D_GT2	0x0D12
103428d7b3dSmrg#define PCI_CHIP_HASWELL_CRW_D_GT3	0x0D22
104428d7b3dSmrg#define PCI_CHIP_HASWELL_CRW_M_GT1	0x0D06
105428d7b3dSmrg#define PCI_CHIP_HASWELL_CRW_M_GT2	0x0D16
106428d7b3dSmrg#define PCI_CHIP_HASWELL_CRW_M_GT3	0x0D26
107428d7b3dSmrg#define PCI_CHIP_HASWELL_CRW_S_GT1	0x0D0A
108428d7b3dSmrg#define PCI_CHIP_HASWELL_CRW_S_GT2	0x0D1A
109428d7b3dSmrg#define PCI_CHIP_HASWELL_CRW_S_GT3	0x0D2A
110428d7b3dSmrg#define PCI_CHIP_HASWELL_CRW_B_GT1	0x0D0B
111428d7b3dSmrg#define PCI_CHIP_HASWELL_CRW_B_GT2	0x0D1B
112428d7b3dSmrg#define PCI_CHIP_HASWELL_CRW_B_GT3	0x0D2B
113428d7b3dSmrg#define PCI_CHIP_HASWELL_CRW_E_GT1	0x0D0E
114428d7b3dSmrg#define PCI_CHIP_HASWELL_CRW_E_GT2	0x0D1E
115428d7b3dSmrg#define PCI_CHIP_HASWELL_CRW_E_GT3	0x0D2E
116428d7b3dSmrg
117428d7b3dSmrgstruct intel_device_info {
118428d7b3dSmrg	int gen;
119428d7b3dSmrg};
120428d7b3dSmrgstruct intel_device;
121428d7b3dSmrg
122428d7b3dSmrgint intel_entity_get_devid(int index);
123428d7b3dSmrg
124428d7b3dSmrgint intel_open_device(int entity_num,
125428d7b3dSmrg		      const struct pci_device *pci,
126428d7b3dSmrg		      struct xf86_platform_device *dev);
127428d7b3dSmrgint __intel_peek_fd(ScrnInfoPtr scrn);
128428d7b3dSmrgstruct intel_device *intel_get_device(ScrnInfoPtr scrn, int *fd);
129428d7b3dSmrgint intel_has_render_node(struct intel_device *dev);
130428d7b3dSmrgconst char *intel_get_client_name(struct intel_device *dev);
131428d7b3dSmrgint intel_get_client_fd(struct intel_device *dev);
132428d7b3dSmrgint intel_get_device_id(struct intel_device *dev);
133428d7b3dSmrgint intel_get_master(struct intel_device *dev);
134428d7b3dSmrgint intel_put_master(struct intel_device *dev);
135428d7b3dSmrgvoid intel_put_device(struct intel_device *dev);
136428d7b3dSmrg
137428d7b3dSmrgvoid intel_detect_chipset(ScrnInfoPtr scrn, struct intel_device *dev);
138428d7b3dSmrg
139428d7b3dSmrg#define IS_DEFAULT_ACCEL_METHOD(x) ({ \
140428d7b3dSmrg	enum { NOACCEL, SNA, UXA } default_accel_method__ = DEFAULT_ACCEL_METHOD; \
141428d7b3dSmrg	default_accel_method__ == x; \
142428d7b3dSmrg})
143428d7b3dSmrg
144428d7b3dSmrg#define hosted() (0)
145428d7b3dSmrg
146428d7b3dSmrg#endif /* INTEL_DRIVER_H */
147