103b705cfSriastradh#ifndef INTEL_DRIVER_H 203b705cfSriastradh#define INTEL_DRIVER_H 303b705cfSriastradh 442542f5fSchristosstruct xf86_platform_device; 542542f5fSchristos 603b705cfSriastradh#define INTEL_VERSION 4000 703b705cfSriastradh#define INTEL_NAME "intel" 803b705cfSriastradh#define INTEL_DRIVER_NAME "intel" 903b705cfSriastradh 1003b705cfSriastradh#define INTEL_VERSION_MAJOR PACKAGE_VERSION_MAJOR 1103b705cfSriastradh#define INTEL_VERSION_MINOR PACKAGE_VERSION_MINOR 1203b705cfSriastradh#define INTEL_VERSION_PATCH PACKAGE_VERSION_PATCHLEVEL 1303b705cfSriastradh 1403b705cfSriastradh#define PCI_CHIP_I810 0x7121 1503b705cfSriastradh#define PCI_CHIP_I810_DC100 0x7123 1603b705cfSriastradh#define PCI_CHIP_I810_E 0x7125 1703b705cfSriastradh#define PCI_CHIP_I815 0x1132 1803b705cfSriastradh 1903b705cfSriastradh#define PCI_CHIP_I830_M 0x3577 2003b705cfSriastradh#define PCI_CHIP_845_G 0x2562 2103b705cfSriastradh#define PCI_CHIP_I854 0x358E 2203b705cfSriastradh#define PCI_CHIP_I855_GM 0x3582 2303b705cfSriastradh#define PCI_CHIP_I865_G 0x2572 2403b705cfSriastradh 2503b705cfSriastradh#define PCI_CHIP_I915_G 0x2582 2603b705cfSriastradh#define PCI_CHIP_I915_GM 0x2592 2703b705cfSriastradh#define PCI_CHIP_E7221_G 0x258A 2803b705cfSriastradh#define PCI_CHIP_I945_G 0x2772 2903b705cfSriastradh#define PCI_CHIP_I945_GM 0x27A2 3003b705cfSriastradh#define PCI_CHIP_I945_GME 0x27AE 3103b705cfSriastradh#define PCI_CHIP_PINEVIEW_M 0xA011 3203b705cfSriastradh#define PCI_CHIP_PINEVIEW_G 0xA001 3303b705cfSriastradh#define PCI_CHIP_Q35_G 0x29B2 3403b705cfSriastradh#define PCI_CHIP_G33_G 0x29C2 3503b705cfSriastradh#define PCI_CHIP_Q33_G 0x29D2 3603b705cfSriastradh 3703b705cfSriastradh#define PCI_CHIP_G35_G 0x2982 3803b705cfSriastradh#define PCI_CHIP_I965_Q 0x2992 3903b705cfSriastradh#define PCI_CHIP_I965_G 0x29A2 4003b705cfSriastradh#define PCI_CHIP_I946_GZ 0x2972 4103b705cfSriastradh#define PCI_CHIP_I965_GM 0x2A02 4203b705cfSriastradh#define PCI_CHIP_I965_GME 0x2A12 4303b705cfSriastradh#define PCI_CHIP_GM45_GM 0x2A42 4403b705cfSriastradh#define PCI_CHIP_G45_E_G 0x2E02 4503b705cfSriastradh#define PCI_CHIP_G45_G 0x2E22 4603b705cfSriastradh#define PCI_CHIP_Q45_G 0x2E12 4703b705cfSriastradh#define PCI_CHIP_G41_G 0x2E32 4803b705cfSriastradh#define PCI_CHIP_B43_G 0x2E42 4903b705cfSriastradh#define PCI_CHIP_B43_G1 0x2E92 5003b705cfSriastradh 5103b705cfSriastradh#define PCI_CHIP_IRONLAKE_D_G 0x0042 5203b705cfSriastradh#define PCI_CHIP_IRONLAKE_M_G 0x0046 5303b705cfSriastradh 5403b705cfSriastradh#define PCI_CHIP_SANDYBRIDGE_GT1 0x0102 5503b705cfSriastradh#define PCI_CHIP_SANDYBRIDGE_GT2 0x0112 5603b705cfSriastradh#define PCI_CHIP_SANDYBRIDGE_GT2_PLUS 0x0122 5703b705cfSriastradh#define PCI_CHIP_SANDYBRIDGE_M_GT1 0x0106 5803b705cfSriastradh#define PCI_CHIP_SANDYBRIDGE_M_GT2 0x0116 5903b705cfSriastradh#define PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS 0x0126 6003b705cfSriastradh#define PCI_CHIP_SANDYBRIDGE_S_GT 0x010A 6103b705cfSriastradh 6203b705cfSriastradh#define PCI_CHIP_IVYBRIDGE_M_GT1 0x0156 6303b705cfSriastradh#define PCI_CHIP_IVYBRIDGE_M_GT2 0x0166 6403b705cfSriastradh#define PCI_CHIP_IVYBRIDGE_D_GT1 0x0152 6503b705cfSriastradh#define PCI_CHIP_IVYBRIDGE_D_GT2 0x0162 6603b705cfSriastradh#define PCI_CHIP_IVYBRIDGE_S_GT1 0x015a 6703b705cfSriastradh#define PCI_CHIP_IVYBRIDGE_S_GT2 0x016a 6803b705cfSriastradh 6903b705cfSriastradh#define PCI_CHIP_HASWELL_D_GT1 0x0402 7003b705cfSriastradh#define PCI_CHIP_HASWELL_D_GT2 0x0412 7103b705cfSriastradh#define PCI_CHIP_HASWELL_D_GT3 0x0422 7203b705cfSriastradh#define PCI_CHIP_HASWELL_M_GT1 0x0406 7303b705cfSriastradh#define PCI_CHIP_HASWELL_M_GT2 0x0416 7403b705cfSriastradh#define PCI_CHIP_HASWELL_M_GT3 0x0426 7503b705cfSriastradh#define PCI_CHIP_HASWELL_S_GT1 0x040A 7603b705cfSriastradh#define PCI_CHIP_HASWELL_S_GT2 0x041A 7703b705cfSriastradh#define PCI_CHIP_HASWELL_S_GT3 0x042A 7803b705cfSriastradh#define PCI_CHIP_HASWELL_B_GT1 0x040B 7903b705cfSriastradh#define PCI_CHIP_HASWELL_B_GT2 0x041B 8003b705cfSriastradh#define PCI_CHIP_HASWELL_B_GT3 0x042B 8103b705cfSriastradh#define PCI_CHIP_HASWELL_E_GT1 0x040E 8203b705cfSriastradh#define PCI_CHIP_HASWELL_E_GT2 0x041E 8303b705cfSriastradh#define PCI_CHIP_HASWELL_E_GT3 0x042E 8403b705cfSriastradh 8503b705cfSriastradh#define PCI_CHIP_HASWELL_ULT_D_GT1 0x0A02 8603b705cfSriastradh#define PCI_CHIP_HASWELL_ULT_D_GT2 0x0A12 8703b705cfSriastradh#define PCI_CHIP_HASWELL_ULT_D_GT3 0x0A22 8803b705cfSriastradh#define PCI_CHIP_HASWELL_ULT_M_GT1 0x0A06 8903b705cfSriastradh#define PCI_CHIP_HASWELL_ULT_M_GT2 0x0A16 9003b705cfSriastradh#define PCI_CHIP_HASWELL_ULT_M_GT3 0x0A26 9103b705cfSriastradh#define PCI_CHIP_HASWELL_ULT_S_GT1 0x0A0A 9203b705cfSriastradh#define PCI_CHIP_HASWELL_ULT_S_GT2 0x0A1A 9303b705cfSriastradh#define PCI_CHIP_HASWELL_ULT_S_GT3 0x0A2A 9403b705cfSriastradh#define PCI_CHIP_HASWELL_ULT_B_GT1 0x0A0B 9503b705cfSriastradh#define PCI_CHIP_HASWELL_ULT_B_GT2 0x0A1B 9603b705cfSriastradh#define PCI_CHIP_HASWELL_ULT_B_GT3 0x0A2B 9703b705cfSriastradh#define PCI_CHIP_HASWELL_ULT_E_GT1 0x0A0E 9803b705cfSriastradh#define PCI_CHIP_HASWELL_ULT_E_GT2 0x0A1E 9903b705cfSriastradh#define PCI_CHIP_HASWELL_ULT_E_GT3 0x0A2E 10003b705cfSriastradh 10103b705cfSriastradh#define PCI_CHIP_HASWELL_CRW_D_GT1 0x0D02 10203b705cfSriastradh#define PCI_CHIP_HASWELL_CRW_D_GT2 0x0D12 10303b705cfSriastradh#define PCI_CHIP_HASWELL_CRW_D_GT3 0x0D22 10403b705cfSriastradh#define PCI_CHIP_HASWELL_CRW_M_GT1 0x0D06 10503b705cfSriastradh#define PCI_CHIP_HASWELL_CRW_M_GT2 0x0D16 10603b705cfSriastradh#define PCI_CHIP_HASWELL_CRW_M_GT3 0x0D26 10703b705cfSriastradh#define PCI_CHIP_HASWELL_CRW_S_GT1 0x0D0A 10803b705cfSriastradh#define PCI_CHIP_HASWELL_CRW_S_GT2 0x0D1A 10903b705cfSriastradh#define PCI_CHIP_HASWELL_CRW_S_GT3 0x0D2A 11003b705cfSriastradh#define PCI_CHIP_HASWELL_CRW_B_GT1 0x0D0B 11103b705cfSriastradh#define PCI_CHIP_HASWELL_CRW_B_GT2 0x0D1B 11203b705cfSriastradh#define PCI_CHIP_HASWELL_CRW_B_GT3 0x0D2B 11303b705cfSriastradh#define PCI_CHIP_HASWELL_CRW_E_GT1 0x0D0E 11403b705cfSriastradh#define PCI_CHIP_HASWELL_CRW_E_GT2 0x0D1E 11503b705cfSriastradh#define PCI_CHIP_HASWELL_CRW_E_GT3 0x0D2E 11603b705cfSriastradh 11703b705cfSriastradhstruct intel_device_info { 11803b705cfSriastradh int gen; 11903b705cfSriastradh}; 12013496ba1Ssnjstruct intel_device; 12103b705cfSriastradh 12242542f5fSchristosint intel_entity_get_devid(int index); 12342542f5fSchristos 12442542f5fSchristosint intel_open_device(int entity_num, 12542542f5fSchristos const struct pci_device *pci, 12642542f5fSchristos struct xf86_platform_device *dev); 127fe8aea9eSmrgvoid intel_close_device(int entity_num); 12842542f5fSchristosint __intel_peek_fd(ScrnInfoPtr scrn); 12913496ba1Ssnjstruct intel_device *intel_get_device(ScrnInfoPtr scrn, int *fd); 13013496ba1Ssnjint intel_has_render_node(struct intel_device *dev); 131fe8aea9eSmrgconst char *intel_get_master_name(struct intel_device *dev); 13213496ba1Ssnjconst char *intel_get_client_name(struct intel_device *dev); 13313496ba1Ssnjint intel_get_client_fd(struct intel_device *dev); 13413496ba1Ssnjint intel_get_device_id(struct intel_device *dev); 13513496ba1Ssnjint intel_get_master(struct intel_device *dev); 13613496ba1Ssnjint intel_put_master(struct intel_device *dev); 13713496ba1Ssnjvoid intel_put_device(struct intel_device *dev); 13813496ba1Ssnj 13913496ba1Ssnjvoid intel_detect_chipset(ScrnInfoPtr scrn, struct intel_device *dev); 14003b705cfSriastradh 14142542f5fSchristos#define IS_DEFAULT_ACCEL_METHOD(x) ({ \ 14213496ba1Ssnj enum { NOACCEL, SNA, UXA } default_accel_method__ = DEFAULT_ACCEL_METHOD; \ 14342542f5fSchristos default_accel_method__ == x; \ 14442542f5fSchristos}) 14503b705cfSriastradh 14603b705cfSriastradh#define hosted() (0) 14703b705cfSriastradh 14803b705cfSriastradh#endif /* INTEL_DRIVER_H */ 149