intel_chipset.h revision 7cdc0497
122944501Smrg/* 222944501Smrg * 322944501Smrg * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas. 422944501Smrg * All Rights Reserved. 522944501Smrg * 622944501Smrg * Permission is hereby granted, free of charge, to any person obtaining a 722944501Smrg * copy of this software and associated documentation files (the 822944501Smrg * "Software"), to deal in the Software without restriction, including 922944501Smrg * without limitation the rights to use, copy, modify, merge, publish, 1022944501Smrg * distribute, sub license, and/or sell copies of the Software, and to 1122944501Smrg * permit persons to whom the Software is furnished to do so, subject to 1222944501Smrg * the following conditions: 1322944501Smrg * 1422944501Smrg * The above copyright notice and this permission notice (including the 1522944501Smrg * next paragraph) shall be included in all copies or substantial portions 1622944501Smrg * of the Software. 1722944501Smrg * 1822944501Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1922944501Smrg * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 2022944501Smrg * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 2122944501Smrg * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR 2222944501Smrg * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 2322944501Smrg * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 2422944501Smrg * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 2522944501Smrg * 2622944501Smrg */ 2722944501Smrg 2822944501Smrg#ifndef _INTEL_CHIPSET_H 2922944501Smrg#define _INTEL_CHIPSET_H 3022944501Smrg 31e88f27b3Smrg#define PCI_CHIP_I810 0x7121 32e88f27b3Smrg#define PCI_CHIP_I810_DC100 0x7123 33e88f27b3Smrg#define PCI_CHIP_I810_E 0x7125 34e88f27b3Smrg#define PCI_CHIP_I815 0x1132 35e88f27b3Smrg 36e88f27b3Smrg#define PCI_CHIP_I830_M 0x3577 37e88f27b3Smrg#define PCI_CHIP_845_G 0x2562 38e88f27b3Smrg#define PCI_CHIP_I855_GM 0x3582 39e88f27b3Smrg#define PCI_CHIP_I865_G 0x2572 40e88f27b3Smrg 41e88f27b3Smrg#define PCI_CHIP_I915_G 0x2582 42e88f27b3Smrg#define PCI_CHIP_E7221_G 0x258A 43e88f27b3Smrg#define PCI_CHIP_I915_GM 0x2592 44e88f27b3Smrg#define PCI_CHIP_I945_G 0x2772 45e88f27b3Smrg#define PCI_CHIP_I945_GM 0x27A2 46e88f27b3Smrg#define PCI_CHIP_I945_GME 0x27AE 47e88f27b3Smrg 48e88f27b3Smrg#define PCI_CHIP_Q35_G 0x29B2 49e88f27b3Smrg#define PCI_CHIP_G33_G 0x29C2 50e88f27b3Smrg#define PCI_CHIP_Q33_G 0x29D2 51e88f27b3Smrg 52e88f27b3Smrg#define PCI_CHIP_IGD_GM 0xA011 53e88f27b3Smrg#define PCI_CHIP_IGD_G 0xA001 54e88f27b3Smrg 55e88f27b3Smrg#define IS_IGDGM(devid) ((devid) == PCI_CHIP_IGD_GM) 56e88f27b3Smrg#define IS_IGDG(devid) ((devid) == PCI_CHIP_IGD_G) 57e88f27b3Smrg#define IS_IGD(devid) (IS_IGDG(devid) || IS_IGDGM(devid)) 58e88f27b3Smrg 59e88f27b3Smrg#define PCI_CHIP_I965_G 0x29A2 60e88f27b3Smrg#define PCI_CHIP_I965_Q 0x2992 61e88f27b3Smrg#define PCI_CHIP_I965_G_1 0x2982 62e88f27b3Smrg#define PCI_CHIP_I946_GZ 0x2972 63e88f27b3Smrg#define PCI_CHIP_I965_GM 0x2A02 64e88f27b3Smrg#define PCI_CHIP_I965_GME 0x2A12 65e88f27b3Smrg 66e88f27b3Smrg#define PCI_CHIP_GM45_GM 0x2A42 67e88f27b3Smrg 68e88f27b3Smrg#define PCI_CHIP_IGD_E_G 0x2E02 69e88f27b3Smrg#define PCI_CHIP_Q45_G 0x2E12 70e88f27b3Smrg#define PCI_CHIP_G45_G 0x2E22 71e88f27b3Smrg#define PCI_CHIP_G41_G 0x2E32 72e88f27b3Smrg 73e88f27b3Smrg#define PCI_CHIP_ILD_G 0x0042 74e88f27b3Smrg#define PCI_CHIP_ILM_G 0x0046 75e88f27b3Smrg 76e88f27b3Smrg#define PCI_CHIP_SANDYBRIDGE_GT1 0x0102 /* desktop */ 77e88f27b3Smrg#define PCI_CHIP_SANDYBRIDGE_GT2 0x0112 78e88f27b3Smrg#define PCI_CHIP_SANDYBRIDGE_GT2_PLUS 0x0122 79e88f27b3Smrg#define PCI_CHIP_SANDYBRIDGE_M_GT1 0x0106 /* mobile */ 80e88f27b3Smrg#define PCI_CHIP_SANDYBRIDGE_M_GT2 0x0116 81e88f27b3Smrg#define PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS 0x0126 82e88f27b3Smrg#define PCI_CHIP_SANDYBRIDGE_S 0x010A /* server */ 83e88f27b3Smrg 84e88f27b3Smrg#define PCI_CHIP_IVYBRIDGE_GT1 0x0152 /* desktop */ 85e88f27b3Smrg#define PCI_CHIP_IVYBRIDGE_GT2 0x0162 86e88f27b3Smrg#define PCI_CHIP_IVYBRIDGE_M_GT1 0x0156 /* mobile */ 87e88f27b3Smrg#define PCI_CHIP_IVYBRIDGE_M_GT2 0x0166 88e88f27b3Smrg#define PCI_CHIP_IVYBRIDGE_S 0x015a /* server */ 89e88f27b3Smrg#define PCI_CHIP_IVYBRIDGE_S_GT2 0x016a /* server */ 90e88f27b3Smrg 91e88f27b3Smrg#define PCI_CHIP_HASWELL_GT1 0x0402 /* Desktop */ 92e88f27b3Smrg#define PCI_CHIP_HASWELL_GT2 0x0412 93e88f27b3Smrg#define PCI_CHIP_HASWELL_GT3 0x0422 94e88f27b3Smrg#define PCI_CHIP_HASWELL_M_GT1 0x0406 /* Mobile */ 95e88f27b3Smrg#define PCI_CHIP_HASWELL_M_GT2 0x0416 96e88f27b3Smrg#define PCI_CHIP_HASWELL_M_GT3 0x0426 97e88f27b3Smrg#define PCI_CHIP_HASWELL_S_GT1 0x040A /* Server */ 98e88f27b3Smrg#define PCI_CHIP_HASWELL_S_GT2 0x041A 99e88f27b3Smrg#define PCI_CHIP_HASWELL_S_GT3 0x042A 100e88f27b3Smrg#define PCI_CHIP_HASWELL_B_GT1 0x040B /* Reserved */ 101e88f27b3Smrg#define PCI_CHIP_HASWELL_B_GT2 0x041B 102e88f27b3Smrg#define PCI_CHIP_HASWELL_B_GT3 0x042B 103e88f27b3Smrg#define PCI_CHIP_HASWELL_E_GT1 0x040E /* Reserved */ 104e88f27b3Smrg#define PCI_CHIP_HASWELL_E_GT2 0x041E 105e88f27b3Smrg#define PCI_CHIP_HASWELL_E_GT3 0x042E 106e88f27b3Smrg#define PCI_CHIP_HASWELL_SDV_GT1 0x0C02 /* Desktop */ 107e88f27b3Smrg#define PCI_CHIP_HASWELL_SDV_GT2 0x0C12 108e88f27b3Smrg#define PCI_CHIP_HASWELL_SDV_GT3 0x0C22 109e88f27b3Smrg#define PCI_CHIP_HASWELL_SDV_M_GT1 0x0C06 /* Mobile */ 110e88f27b3Smrg#define PCI_CHIP_HASWELL_SDV_M_GT2 0x0C16 111e88f27b3Smrg#define PCI_CHIP_HASWELL_SDV_M_GT3 0x0C26 112e88f27b3Smrg#define PCI_CHIP_HASWELL_SDV_S_GT1 0x0C0A /* Server */ 113e88f27b3Smrg#define PCI_CHIP_HASWELL_SDV_S_GT2 0x0C1A 114e88f27b3Smrg#define PCI_CHIP_HASWELL_SDV_S_GT3 0x0C2A 115e88f27b3Smrg#define PCI_CHIP_HASWELL_SDV_B_GT1 0x0C0B /* Reserved */ 116e88f27b3Smrg#define PCI_CHIP_HASWELL_SDV_B_GT2 0x0C1B 117e88f27b3Smrg#define PCI_CHIP_HASWELL_SDV_B_GT3 0x0C2B 118e88f27b3Smrg#define PCI_CHIP_HASWELL_SDV_E_GT1 0x0C0E /* Reserved */ 119e88f27b3Smrg#define PCI_CHIP_HASWELL_SDV_E_GT2 0x0C1E 120e88f27b3Smrg#define PCI_CHIP_HASWELL_SDV_E_GT3 0x0C2E 121e88f27b3Smrg#define PCI_CHIP_HASWELL_ULT_GT1 0x0A02 /* Desktop */ 122e88f27b3Smrg#define PCI_CHIP_HASWELL_ULT_GT2 0x0A12 123e88f27b3Smrg#define PCI_CHIP_HASWELL_ULT_GT3 0x0A22 124e88f27b3Smrg#define PCI_CHIP_HASWELL_ULT_M_GT1 0x0A06 /* Mobile */ 125e88f27b3Smrg#define PCI_CHIP_HASWELL_ULT_M_GT2 0x0A16 126e88f27b3Smrg#define PCI_CHIP_HASWELL_ULT_M_GT3 0x0A26 127e88f27b3Smrg#define PCI_CHIP_HASWELL_ULT_S_GT1 0x0A0A /* Server */ 128e88f27b3Smrg#define PCI_CHIP_HASWELL_ULT_S_GT2 0x0A1A 129e88f27b3Smrg#define PCI_CHIP_HASWELL_ULT_S_GT3 0x0A2A 130e88f27b3Smrg#define PCI_CHIP_HASWELL_ULT_B_GT1 0x0A0B /* Reserved */ 131e88f27b3Smrg#define PCI_CHIP_HASWELL_ULT_B_GT2 0x0A1B 132e88f27b3Smrg#define PCI_CHIP_HASWELL_ULT_B_GT3 0x0A2B 133e88f27b3Smrg#define PCI_CHIP_HASWELL_ULT_E_GT1 0x0A0E /* Reserved */ 134e88f27b3Smrg#define PCI_CHIP_HASWELL_ULT_E_GT2 0x0A1E 135e88f27b3Smrg#define PCI_CHIP_HASWELL_ULT_E_GT3 0x0A2E 136e88f27b3Smrg#define PCI_CHIP_HASWELL_CRW_GT1 0x0D02 /* Desktop */ 137e88f27b3Smrg#define PCI_CHIP_HASWELL_CRW_GT2 0x0D12 138e88f27b3Smrg#define PCI_CHIP_HASWELL_CRW_GT3 0x0D22 139e88f27b3Smrg#define PCI_CHIP_HASWELL_CRW_M_GT1 0x0D06 /* Mobile */ 140e88f27b3Smrg#define PCI_CHIP_HASWELL_CRW_M_GT2 0x0D16 141e88f27b3Smrg#define PCI_CHIP_HASWELL_CRW_M_GT3 0x0D26 142e88f27b3Smrg#define PCI_CHIP_HASWELL_CRW_S_GT1 0x0D0A /* Server */ 143e88f27b3Smrg#define PCI_CHIP_HASWELL_CRW_S_GT2 0x0D1A 144e88f27b3Smrg#define PCI_CHIP_HASWELL_CRW_S_GT3 0x0D2A 145e88f27b3Smrg#define PCI_CHIP_HASWELL_CRW_B_GT1 0x0D0B /* Reserved */ 146e88f27b3Smrg#define PCI_CHIP_HASWELL_CRW_B_GT2 0x0D1B 147e88f27b3Smrg#define PCI_CHIP_HASWELL_CRW_B_GT3 0x0D2B 148e88f27b3Smrg#define PCI_CHIP_HASWELL_CRW_E_GT1 0x0D0E /* Reserved */ 149e88f27b3Smrg#define PCI_CHIP_HASWELL_CRW_E_GT2 0x0D1E 150e88f27b3Smrg#define PCI_CHIP_HASWELL_CRW_E_GT3 0x0D2E 151e88f27b3Smrg#define BDW_SPARE 0x2 152e88f27b3Smrg#define BDW_ULT 0x6 153e88f27b3Smrg#define BDW_SERVER 0xa 154e88f27b3Smrg#define BDW_IRIS 0xb 155e88f27b3Smrg#define BDW_WORKSTATION 0xd 156e88f27b3Smrg#define BDW_ULX 0xe 157e88f27b3Smrg 158e88f27b3Smrg#define PCI_CHIP_VALLEYVIEW_PO 0x0f30 /* VLV PO board */ 159e88f27b3Smrg#define PCI_CHIP_VALLEYVIEW_1 0x0f31 160e88f27b3Smrg#define PCI_CHIP_VALLEYVIEW_2 0x0f32 161e88f27b3Smrg#define PCI_CHIP_VALLEYVIEW_3 0x0f33 162e88f27b3Smrg 163857b0bc6Smrg#define PCI_CHIP_CHERRYVIEW_0 0x22b0 164857b0bc6Smrg#define PCI_CHIP_CHERRYVIEW_1 0x22b1 165857b0bc6Smrg#define PCI_CHIP_CHERRYVIEW_2 0x22b2 166857b0bc6Smrg#define PCI_CHIP_CHERRYVIEW_3 0x22b3 167857b0bc6Smrg 16808d7334dSsnj#define PCI_CHIP_SKYLAKE_DT_GT2 0x1912 1693f012e29Smrg#define PCI_CHIP_KABYLAKE_DT_GT2 0x5912 170d8807b2fSmrg 171e88f27b3Smrg#define IS_MOBILE(devid) ((devid) == PCI_CHIP_I855_GM || \ 172e88f27b3Smrg (devid) == PCI_CHIP_I915_GM || \ 173e88f27b3Smrg (devid) == PCI_CHIP_I945_GM || \ 174e88f27b3Smrg (devid) == PCI_CHIP_I945_GME || \ 175e88f27b3Smrg (devid) == PCI_CHIP_I965_GM || \ 176e88f27b3Smrg (devid) == PCI_CHIP_I965_GME || \ 177e88f27b3Smrg (devid) == PCI_CHIP_GM45_GM || IS_IGD(devid) || \ 178e88f27b3Smrg (devid) == PCI_CHIP_IVYBRIDGE_M_GT1 || \ 179e88f27b3Smrg (devid) == PCI_CHIP_IVYBRIDGE_M_GT2) 180e88f27b3Smrg 181e88f27b3Smrg#define IS_G45(devid) ((devid) == PCI_CHIP_IGD_E_G || \ 182e88f27b3Smrg (devid) == PCI_CHIP_Q45_G || \ 183e88f27b3Smrg (devid) == PCI_CHIP_G45_G || \ 184e88f27b3Smrg (devid) == PCI_CHIP_G41_G) 185e88f27b3Smrg#define IS_GM45(devid) ((devid) == PCI_CHIP_GM45_GM) 186e88f27b3Smrg#define IS_G4X(devid) (IS_G45(devid) || IS_GM45(devid)) 187e88f27b3Smrg 188e88f27b3Smrg#define IS_ILD(devid) ((devid) == PCI_CHIP_ILD_G) 189e88f27b3Smrg#define IS_ILM(devid) ((devid) == PCI_CHIP_ILM_G) 190e88f27b3Smrg 191e88f27b3Smrg#define IS_915(devid) ((devid) == PCI_CHIP_I915_G || \ 192e88f27b3Smrg (devid) == PCI_CHIP_E7221_G || \ 193e88f27b3Smrg (devid) == PCI_CHIP_I915_GM) 194e88f27b3Smrg 195e88f27b3Smrg#define IS_945GM(devid) ((devid) == PCI_CHIP_I945_GM || \ 196e88f27b3Smrg (devid) == PCI_CHIP_I945_GME) 197e88f27b3Smrg 198e88f27b3Smrg#define IS_945(devid) ((devid) == PCI_CHIP_I945_G || \ 199e88f27b3Smrg (devid) == PCI_CHIP_I945_GM || \ 200e88f27b3Smrg (devid) == PCI_CHIP_I945_GME || \ 201e88f27b3Smrg IS_G33(devid)) 202e88f27b3Smrg 203e88f27b3Smrg#define IS_G33(devid) ((devid) == PCI_CHIP_G33_G || \ 204e88f27b3Smrg (devid) == PCI_CHIP_Q33_G || \ 205e88f27b3Smrg (devid) == PCI_CHIP_Q35_G || IS_IGD(devid)) 206e88f27b3Smrg 207e88f27b3Smrg#define IS_GEN2(devid) ((devid) == PCI_CHIP_I830_M || \ 208e88f27b3Smrg (devid) == PCI_CHIP_845_G || \ 209e88f27b3Smrg (devid) == PCI_CHIP_I855_GM || \ 210e88f27b3Smrg (devid) == PCI_CHIP_I865_G) 211e88f27b3Smrg 212e88f27b3Smrg#define IS_GEN3(devid) (IS_945(devid) || IS_915(devid)) 213e88f27b3Smrg 214e88f27b3Smrg#define IS_GEN4(devid) ((devid) == PCI_CHIP_I965_G || \ 215e88f27b3Smrg (devid) == PCI_CHIP_I965_Q || \ 216e88f27b3Smrg (devid) == PCI_CHIP_I965_G_1 || \ 217e88f27b3Smrg (devid) == PCI_CHIP_I965_GM || \ 218e88f27b3Smrg (devid) == PCI_CHIP_I965_GME || \ 219e88f27b3Smrg (devid) == PCI_CHIP_I946_GZ || \ 220e88f27b3Smrg IS_G4X(devid)) 221e88f27b3Smrg 222e88f27b3Smrg#define IS_GEN5(devid) (IS_ILD(devid) || IS_ILM(devid)) 223e88f27b3Smrg 224e88f27b3Smrg#define IS_GEN6(devid) ((devid) == PCI_CHIP_SANDYBRIDGE_GT1 || \ 225e88f27b3Smrg (devid) == PCI_CHIP_SANDYBRIDGE_GT2 || \ 226e88f27b3Smrg (devid) == PCI_CHIP_SANDYBRIDGE_GT2_PLUS || \ 227e88f27b3Smrg (devid) == PCI_CHIP_SANDYBRIDGE_M_GT1 || \ 228e88f27b3Smrg (devid) == PCI_CHIP_SANDYBRIDGE_M_GT2 || \ 229e88f27b3Smrg (devid) == PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS || \ 230e88f27b3Smrg (devid) == PCI_CHIP_SANDYBRIDGE_S) 231e88f27b3Smrg 232e88f27b3Smrg#define IS_GEN7(devid) (IS_IVYBRIDGE(devid) || \ 233e88f27b3Smrg IS_HASWELL(devid) || \ 234e88f27b3Smrg IS_VALLEYVIEW(devid)) 235e88f27b3Smrg 236e88f27b3Smrg#define IS_IVYBRIDGE(devid) ((devid) == PCI_CHIP_IVYBRIDGE_GT1 || \ 237e88f27b3Smrg (devid) == PCI_CHIP_IVYBRIDGE_GT2 || \ 238e88f27b3Smrg (devid) == PCI_CHIP_IVYBRIDGE_M_GT1 || \ 239e88f27b3Smrg (devid) == PCI_CHIP_IVYBRIDGE_M_GT2 || \ 240e88f27b3Smrg (devid) == PCI_CHIP_IVYBRIDGE_S || \ 241e88f27b3Smrg (devid) == PCI_CHIP_IVYBRIDGE_S_GT2) 242e88f27b3Smrg 243e88f27b3Smrg#define IS_VALLEYVIEW(devid) ((devid) == PCI_CHIP_VALLEYVIEW_PO || \ 244e88f27b3Smrg (devid) == PCI_CHIP_VALLEYVIEW_1 || \ 245e88f27b3Smrg (devid) == PCI_CHIP_VALLEYVIEW_2 || \ 246e88f27b3Smrg (devid) == PCI_CHIP_VALLEYVIEW_3) 247e88f27b3Smrg 248e88f27b3Smrg#define IS_HSW_GT1(devid) ((devid) == PCI_CHIP_HASWELL_GT1 || \ 249e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_M_GT1 || \ 250e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_S_GT1 || \ 251e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_B_GT1 || \ 252e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_E_GT1 || \ 253e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_SDV_GT1 || \ 254e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_SDV_M_GT1 || \ 255e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_SDV_S_GT1 || \ 256e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_SDV_B_GT1 || \ 257e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_SDV_E_GT1 || \ 258e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_ULT_GT1 || \ 259e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_ULT_M_GT1 || \ 260e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_ULT_S_GT1 || \ 261e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_ULT_B_GT1 || \ 262e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_ULT_E_GT1 || \ 263e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_CRW_GT1 || \ 264e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_CRW_M_GT1 || \ 265e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_CRW_S_GT1 || \ 266e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_CRW_B_GT1 || \ 267e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_CRW_E_GT1) 268e88f27b3Smrg#define IS_HSW_GT2(devid) ((devid) == PCI_CHIP_HASWELL_GT2 || \ 269e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_M_GT2 || \ 270e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_S_GT2 || \ 271e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_B_GT2 || \ 272e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_E_GT2 || \ 273e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_SDV_GT2 || \ 274e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_SDV_M_GT2 || \ 275e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_SDV_S_GT2 || \ 276e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_SDV_B_GT2 || \ 277e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_SDV_E_GT2 || \ 278e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_ULT_GT2 || \ 279e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_ULT_M_GT2 || \ 280e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_ULT_S_GT2 || \ 281e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_ULT_B_GT2 || \ 282e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_ULT_E_GT2 || \ 283e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_CRW_GT2 || \ 284e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_CRW_M_GT2 || \ 285e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_CRW_S_GT2 || \ 286e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_CRW_B_GT2 || \ 287e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_CRW_E_GT2) 288e88f27b3Smrg#define IS_HSW_GT3(devid) ((devid) == PCI_CHIP_HASWELL_GT3 || \ 289e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_M_GT3 || \ 290e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_S_GT3 || \ 291e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_B_GT3 || \ 292e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_E_GT3 || \ 293e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_SDV_GT3 || \ 294e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_SDV_M_GT3 || \ 295e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_SDV_S_GT3 || \ 296e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_SDV_B_GT3 || \ 297e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_SDV_E_GT3 || \ 298e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_ULT_GT3 || \ 299e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_ULT_M_GT3 || \ 300e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_ULT_S_GT3 || \ 301e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_ULT_B_GT3 || \ 302e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_ULT_E_GT3 || \ 303e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_CRW_GT3 || \ 304e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_CRW_M_GT3 || \ 305e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_CRW_S_GT3 || \ 306e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_CRW_B_GT3 || \ 307e88f27b3Smrg (devid) == PCI_CHIP_HASWELL_CRW_E_GT3) 308e88f27b3Smrg 309e88f27b3Smrg#define IS_HASWELL(devid) (IS_HSW_GT1(devid) || \ 310e88f27b3Smrg IS_HSW_GT2(devid) || \ 311e88f27b3Smrg IS_HSW_GT3(devid)) 312e88f27b3Smrg 313e88f27b3Smrg#define IS_BROADWELL(devid) (((devid & 0xff00) != 0x1600) ? 0 : \ 314e88f27b3Smrg (((devid & 0x00f0) >> 4) > 3) ? 0 : \ 315e88f27b3Smrg ((devid & 0x000f) == BDW_SPARE) ? 1 : \ 316e88f27b3Smrg ((devid & 0x000f) == BDW_ULT) ? 1 : \ 317e88f27b3Smrg ((devid & 0x000f) == BDW_IRIS) ? 1 : \ 318e88f27b3Smrg ((devid & 0x000f) == BDW_SERVER) ? 1 : \ 319e88f27b3Smrg ((devid & 0x000f) == BDW_WORKSTATION) ? 1 : \ 320e88f27b3Smrg ((devid & 0x000f) == BDW_ULX) ? 1 : 0) 321e88f27b3Smrg 322857b0bc6Smrg#define IS_CHERRYVIEW(devid) ((devid) == PCI_CHIP_CHERRYVIEW_0 || \ 323857b0bc6Smrg (devid) == PCI_CHIP_CHERRYVIEW_1 || \ 324857b0bc6Smrg (devid) == PCI_CHIP_CHERRYVIEW_2 || \ 325857b0bc6Smrg (devid) == PCI_CHIP_CHERRYVIEW_3) 326e88f27b3Smrg 327857b0bc6Smrg#define IS_GEN8(devid) (IS_BROADWELL(devid) || \ 328857b0bc6Smrg IS_CHERRYVIEW(devid)) 329e88f27b3Smrg 3307cdc0497Smrg/* New platforms use kernel pci ids */ 3317cdc0497Smrg#include <stdbool.h> 3327cdc0497Smrg#include <libdrm_macros.h> 3337cdc0497Smrg 3347cdc0497Smrgdrm_private bool intel_is_genx(unsigned int devid, int gen); 3357cdc0497Smrgdrm_private bool intel_get_genx(unsigned int devid, int *gen); 3367cdc0497Smrg 3377cdc0497Smrg#define IS_GEN9(devid) intel_is_genx(devid, 9) 3387cdc0497Smrg#define IS_GEN10(devid) intel_is_genx(devid, 10) 3397cdc0497Smrg#define IS_GEN11(devid) intel_is_genx(devid, 11) 34008d7334dSsnj 341e88f27b3Smrg#define IS_9XX(dev) (IS_GEN3(dev) || \ 342e88f27b3Smrg IS_GEN4(dev) || \ 343e88f27b3Smrg IS_GEN5(dev) || \ 344e88f27b3Smrg IS_GEN6(dev) || \ 345e88f27b3Smrg IS_GEN7(dev) || \ 34608d7334dSsnj IS_GEN8(dev) || \ 3477cdc0497Smrg intel_get_genx(dev, NULL)) 34822944501Smrg 34922944501Smrg#endif /* _INTEL_CHIPSET_H */ 350