Blame intel/intel_chipset.h

Packit 631bab
/*
Packit 631bab
 *
Packit 631bab
 * Copyright 2003 Tungsten Graphics, Inc., Cedar Park, Texas.
Packit 631bab
 * All Rights Reserved.
Packit 631bab
 *
Packit 631bab
 * Permission is hereby granted, free of charge, to any person obtaining a
Packit 631bab
 * copy of this software and associated documentation files (the
Packit 631bab
 * "Software"), to deal in the Software without restriction, including
Packit 631bab
 * without limitation the rights to use, copy, modify, merge, publish,
Packit 631bab
 * distribute, sub license, and/or sell copies of the Software, and to
Packit 631bab
 * permit persons to whom the Software is furnished to do so, subject to
Packit 631bab
 * the following conditions:
Packit 631bab
 *
Packit 631bab
 * The above copyright notice and this permission notice (including the
Packit 631bab
 * next paragraph) shall be included in all copies or substantial portions
Packit 631bab
 * of the Software.
Packit 631bab
 *
Packit 631bab
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
Packit 631bab
 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
Packit 631bab
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
Packit 631bab
 * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
Packit 631bab
 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
Packit 631bab
 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
Packit 631bab
 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Packit 631bab
 *
Packit 631bab
 */
Packit 631bab
Packit 631bab
#ifndef _INTEL_CHIPSET_H
Packit 631bab
#define _INTEL_CHIPSET_H
Packit 631bab
Packit 631bab
#define PCI_CHIP_I810			0x7121
Packit 631bab
#define PCI_CHIP_I810_DC100		0x7123
Packit 631bab
#define PCI_CHIP_I810_E			0x7125
Packit 631bab
#define PCI_CHIP_I815			0x1132
Packit 631bab
Packit 631bab
#define PCI_CHIP_I830_M			0x3577
Packit 631bab
#define PCI_CHIP_845_G			0x2562
Packit 631bab
#define PCI_CHIP_I855_GM		0x3582
Packit 631bab
#define PCI_CHIP_I865_G			0x2572
Packit 631bab
Packit 631bab
#define PCI_CHIP_I915_G			0x2582
Packit 631bab
#define PCI_CHIP_E7221_G		0x258A
Packit 631bab
#define PCI_CHIP_I915_GM		0x2592
Packit 631bab
#define PCI_CHIP_I945_G			0x2772
Packit 631bab
#define PCI_CHIP_I945_GM		0x27A2
Packit 631bab
#define PCI_CHIP_I945_GME		0x27AE
Packit 631bab
Packit 631bab
#define PCI_CHIP_Q35_G			0x29B2
Packit 631bab
#define PCI_CHIP_G33_G			0x29C2
Packit 631bab
#define PCI_CHIP_Q33_G			0x29D2
Packit 631bab
Packit 631bab
#define PCI_CHIP_IGD_GM			0xA011
Packit 631bab
#define PCI_CHIP_IGD_G			0xA001
Packit 631bab
Packit 631bab
#define IS_IGDGM(devid)		((devid) == PCI_CHIP_IGD_GM)
Packit 631bab
#define IS_IGDG(devid)		((devid) == PCI_CHIP_IGD_G)
Packit 631bab
#define IS_IGD(devid)		(IS_IGDG(devid) || IS_IGDGM(devid))
Packit 631bab
Packit 631bab
#define PCI_CHIP_I965_G			0x29A2
Packit 631bab
#define PCI_CHIP_I965_Q			0x2992
Packit 631bab
#define PCI_CHIP_I965_G_1		0x2982
Packit 631bab
#define PCI_CHIP_I946_GZ		0x2972
Packit 631bab
#define PCI_CHIP_I965_GM		0x2A02
Packit 631bab
#define PCI_CHIP_I965_GME		0x2A12
Packit 631bab
Packit 631bab
#define PCI_CHIP_GM45_GM		0x2A42
Packit 631bab
Packit 631bab
#define PCI_CHIP_IGD_E_G		0x2E02
Packit 631bab
#define PCI_CHIP_Q45_G			0x2E12
Packit 631bab
#define PCI_CHIP_G45_G			0x2E22
Packit 631bab
#define PCI_CHIP_G41_G			0x2E32
Packit 631bab
Packit 631bab
#define PCI_CHIP_ILD_G			0x0042
Packit 631bab
#define PCI_CHIP_ILM_G			0x0046
Packit 631bab
Packit 631bab
#define PCI_CHIP_SANDYBRIDGE_GT1	0x0102 /* desktop */
Packit 631bab
#define PCI_CHIP_SANDYBRIDGE_GT2	0x0112
Packit 631bab
#define PCI_CHIP_SANDYBRIDGE_GT2_PLUS	0x0122
Packit 631bab
#define PCI_CHIP_SANDYBRIDGE_M_GT1	0x0106 /* mobile */
Packit 631bab
#define PCI_CHIP_SANDYBRIDGE_M_GT2	0x0116
Packit 631bab
#define PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS	0x0126
Packit 631bab
#define PCI_CHIP_SANDYBRIDGE_S		0x010A /* server */
Packit 631bab
Packit 631bab
#define PCI_CHIP_IVYBRIDGE_GT1		0x0152 /* desktop */
Packit 631bab
#define PCI_CHIP_IVYBRIDGE_GT2		0x0162
Packit 631bab
#define PCI_CHIP_IVYBRIDGE_M_GT1	0x0156 /* mobile */
Packit 631bab
#define PCI_CHIP_IVYBRIDGE_M_GT2	0x0166
Packit 631bab
#define PCI_CHIP_IVYBRIDGE_S		0x015a /* server */
Packit 631bab
#define PCI_CHIP_IVYBRIDGE_S_GT2	0x016a /* server */
Packit 631bab
Packit 631bab
#define PCI_CHIP_HASWELL_GT1		0x0402 /* Desktop */
Packit 631bab
#define PCI_CHIP_HASWELL_GT2		0x0412
Packit 631bab
#define PCI_CHIP_HASWELL_GT3		0x0422
Packit 631bab
#define PCI_CHIP_HASWELL_M_GT1		0x0406 /* Mobile */
Packit 631bab
#define PCI_CHIP_HASWELL_M_GT2		0x0416
Packit 631bab
#define PCI_CHIP_HASWELL_M_GT3		0x0426
Packit 631bab
#define PCI_CHIP_HASWELL_S_GT1		0x040A /* Server */
Packit 631bab
#define PCI_CHIP_HASWELL_S_GT2		0x041A
Packit 631bab
#define PCI_CHIP_HASWELL_S_GT3		0x042A
Packit 631bab
#define PCI_CHIP_HASWELL_B_GT1		0x040B /* Reserved */
Packit 631bab
#define PCI_CHIP_HASWELL_B_GT2		0x041B
Packit 631bab
#define PCI_CHIP_HASWELL_B_GT3		0x042B
Packit 631bab
#define PCI_CHIP_HASWELL_E_GT1		0x040E /* Reserved */
Packit 631bab
#define PCI_CHIP_HASWELL_E_GT2		0x041E
Packit 631bab
#define PCI_CHIP_HASWELL_E_GT3		0x042E
Packit 631bab
#define PCI_CHIP_HASWELL_SDV_GT1	0x0C02 /* Desktop */
Packit 631bab
#define PCI_CHIP_HASWELL_SDV_GT2	0x0C12
Packit 631bab
#define PCI_CHIP_HASWELL_SDV_GT3	0x0C22
Packit 631bab
#define PCI_CHIP_HASWELL_SDV_M_GT1	0x0C06 /* Mobile */
Packit 631bab
#define PCI_CHIP_HASWELL_SDV_M_GT2	0x0C16
Packit 631bab
#define PCI_CHIP_HASWELL_SDV_M_GT3	0x0C26
Packit 631bab
#define PCI_CHIP_HASWELL_SDV_S_GT1	0x0C0A /* Server */
Packit 631bab
#define PCI_CHIP_HASWELL_SDV_S_GT2	0x0C1A
Packit 631bab
#define PCI_CHIP_HASWELL_SDV_S_GT3	0x0C2A
Packit 631bab
#define PCI_CHIP_HASWELL_SDV_B_GT1	0x0C0B /* Reserved */
Packit 631bab
#define PCI_CHIP_HASWELL_SDV_B_GT2	0x0C1B
Packit 631bab
#define PCI_CHIP_HASWELL_SDV_B_GT3	0x0C2B
Packit 631bab
#define PCI_CHIP_HASWELL_SDV_E_GT1	0x0C0E /* Reserved */
Packit 631bab
#define PCI_CHIP_HASWELL_SDV_E_GT2	0x0C1E
Packit 631bab
#define PCI_CHIP_HASWELL_SDV_E_GT3	0x0C2E
Packit 631bab
#define PCI_CHIP_HASWELL_ULT_GT1	0x0A02 /* Desktop */
Packit 631bab
#define PCI_CHIP_HASWELL_ULT_GT2	0x0A12
Packit 631bab
#define PCI_CHIP_HASWELL_ULT_GT3	0x0A22
Packit 631bab
#define PCI_CHIP_HASWELL_ULT_M_GT1	0x0A06 /* Mobile */
Packit 631bab
#define PCI_CHIP_HASWELL_ULT_M_GT2	0x0A16
Packit 631bab
#define PCI_CHIP_HASWELL_ULT_M_GT3	0x0A26
Packit 631bab
#define PCI_CHIP_HASWELL_ULT_S_GT1	0x0A0A /* Server */
Packit 631bab
#define PCI_CHIP_HASWELL_ULT_S_GT2	0x0A1A
Packit 631bab
#define PCI_CHIP_HASWELL_ULT_S_GT3	0x0A2A
Packit 631bab
#define PCI_CHIP_HASWELL_ULT_B_GT1	0x0A0B /* Reserved */
Packit 631bab
#define PCI_CHIP_HASWELL_ULT_B_GT2	0x0A1B
Packit 631bab
#define PCI_CHIP_HASWELL_ULT_B_GT3	0x0A2B
Packit 631bab
#define PCI_CHIP_HASWELL_ULT_E_GT1	0x0A0E /* Reserved */
Packit 631bab
#define PCI_CHIP_HASWELL_ULT_E_GT2	0x0A1E
Packit 631bab
#define PCI_CHIP_HASWELL_ULT_E_GT3	0x0A2E
Packit 631bab
#define PCI_CHIP_HASWELL_CRW_GT1	0x0D02 /* Desktop */
Packit 631bab
#define PCI_CHIP_HASWELL_CRW_GT2	0x0D12
Packit 631bab
#define PCI_CHIP_HASWELL_CRW_GT3	0x0D22
Packit 631bab
#define PCI_CHIP_HASWELL_CRW_M_GT1	0x0D06 /* Mobile */
Packit 631bab
#define PCI_CHIP_HASWELL_CRW_M_GT2	0x0D16
Packit 631bab
#define PCI_CHIP_HASWELL_CRW_M_GT3	0x0D26
Packit 631bab
#define PCI_CHIP_HASWELL_CRW_S_GT1	0x0D0A /* Server */
Packit 631bab
#define PCI_CHIP_HASWELL_CRW_S_GT2	0x0D1A
Packit 631bab
#define PCI_CHIP_HASWELL_CRW_S_GT3	0x0D2A
Packit 631bab
#define PCI_CHIP_HASWELL_CRW_B_GT1	0x0D0B /* Reserved */
Packit 631bab
#define PCI_CHIP_HASWELL_CRW_B_GT2	0x0D1B
Packit 631bab
#define PCI_CHIP_HASWELL_CRW_B_GT3	0x0D2B
Packit 631bab
#define PCI_CHIP_HASWELL_CRW_E_GT1	0x0D0E /* Reserved */
Packit 631bab
#define PCI_CHIP_HASWELL_CRW_E_GT2	0x0D1E
Packit 631bab
#define PCI_CHIP_HASWELL_CRW_E_GT3	0x0D2E
Packit 631bab
#define BDW_SPARE			0x2
Packit 631bab
#define BDW_ULT				0x6
Packit 631bab
#define BDW_SERVER			0xa
Packit 631bab
#define BDW_IRIS			0xb
Packit 631bab
#define BDW_WORKSTATION			0xd
Packit 631bab
#define BDW_ULX				0xe
Packit 631bab
Packit 631bab
#define PCI_CHIP_VALLEYVIEW_PO		0x0f30 /* VLV PO board */
Packit 631bab
#define PCI_CHIP_VALLEYVIEW_1		0x0f31
Packit 631bab
#define PCI_CHIP_VALLEYVIEW_2		0x0f32
Packit 631bab
#define PCI_CHIP_VALLEYVIEW_3		0x0f33
Packit 631bab
Packit 631bab
#define PCI_CHIP_CHERRYVIEW_0		0x22b0
Packit 631bab
#define PCI_CHIP_CHERRYVIEW_1		0x22b1
Packit 631bab
#define PCI_CHIP_CHERRYVIEW_2		0x22b2
Packit 631bab
#define PCI_CHIP_CHERRYVIEW_3		0x22b3
Packit 631bab
Packit 631bab
#define PCI_CHIP_SKYLAKE_DT_GT2		0x1912
Packit 631bab
#define PCI_CHIP_KABYLAKE_DT_GT2	0x5912
Packit 631bab
Packit 631bab
#define IS_MOBILE(devid)	((devid) == PCI_CHIP_I855_GM || \
Packit 631bab
				 (devid) == PCI_CHIP_I915_GM || \
Packit 631bab
				 (devid) == PCI_CHIP_I945_GM || \
Packit 631bab
				 (devid) == PCI_CHIP_I945_GME || \
Packit 631bab
				 (devid) == PCI_CHIP_I965_GM || \
Packit 631bab
				 (devid) == PCI_CHIP_I965_GME || \
Packit 631bab
				 (devid) == PCI_CHIP_GM45_GM || IS_IGD(devid) || \
Packit 631bab
				 (devid) == PCI_CHIP_IVYBRIDGE_M_GT1 || \
Packit 631bab
				 (devid) == PCI_CHIP_IVYBRIDGE_M_GT2)
Packit 631bab
Packit 631bab
#define IS_G45(devid)		((devid) == PCI_CHIP_IGD_E_G || \
Packit 631bab
				 (devid) == PCI_CHIP_Q45_G || \
Packit 631bab
				 (devid) == PCI_CHIP_G45_G || \
Packit 631bab
				 (devid) == PCI_CHIP_G41_G)
Packit 631bab
#define IS_GM45(devid)		((devid) == PCI_CHIP_GM45_GM)
Packit 631bab
#define IS_G4X(devid)		(IS_G45(devid) || IS_GM45(devid))
Packit 631bab
Packit 631bab
#define IS_ILD(devid)		((devid) == PCI_CHIP_ILD_G)
Packit 631bab
#define IS_ILM(devid)		((devid) == PCI_CHIP_ILM_G)
Packit 631bab
Packit 631bab
#define IS_915(devid)		((devid) == PCI_CHIP_I915_G || \
Packit 631bab
				 (devid) == PCI_CHIP_E7221_G || \
Packit 631bab
				 (devid) == PCI_CHIP_I915_GM)
Packit 631bab
Packit 631bab
#define IS_945GM(devid)		((devid) == PCI_CHIP_I945_GM || \
Packit 631bab
				 (devid) == PCI_CHIP_I945_GME)
Packit 631bab
Packit 631bab
#define IS_945(devid)		((devid) == PCI_CHIP_I945_G || \
Packit 631bab
				 (devid) == PCI_CHIP_I945_GM || \
Packit 631bab
				 (devid) == PCI_CHIP_I945_GME || \
Packit 631bab
				 IS_G33(devid))
Packit 631bab
Packit 631bab
#define IS_G33(devid)		((devid) == PCI_CHIP_G33_G || \
Packit 631bab
				 (devid) == PCI_CHIP_Q33_G || \
Packit 631bab
				 (devid) == PCI_CHIP_Q35_G || IS_IGD(devid))
Packit 631bab
Packit 631bab
#define IS_GEN2(devid)		((devid) == PCI_CHIP_I830_M || \
Packit 631bab
				 (devid) == PCI_CHIP_845_G || \
Packit 631bab
				 (devid) == PCI_CHIP_I855_GM || \
Packit 631bab
				 (devid) == PCI_CHIP_I865_G)
Packit 631bab
Packit 631bab
#define IS_GEN3(devid)		(IS_945(devid) || IS_915(devid))
Packit 631bab
Packit 631bab
#define IS_GEN4(devid)		((devid) == PCI_CHIP_I965_G || \
Packit 631bab
				 (devid) == PCI_CHIP_I965_Q || \
Packit 631bab
				 (devid) == PCI_CHIP_I965_G_1 || \
Packit 631bab
				 (devid) == PCI_CHIP_I965_GM || \
Packit 631bab
				 (devid) == PCI_CHIP_I965_GME || \
Packit 631bab
				 (devid) == PCI_CHIP_I946_GZ || \
Packit 631bab
				 IS_G4X(devid))
Packit 631bab
Packit 631bab
#define IS_GEN5(devid)		(IS_ILD(devid) || IS_ILM(devid))
Packit 631bab
Packit 631bab
#define IS_GEN6(devid)		((devid) == PCI_CHIP_SANDYBRIDGE_GT1 || \
Packit 631bab
				 (devid) == PCI_CHIP_SANDYBRIDGE_GT2 || \
Packit 631bab
				 (devid) == PCI_CHIP_SANDYBRIDGE_GT2_PLUS || \
Packit 631bab
				 (devid) == PCI_CHIP_SANDYBRIDGE_M_GT1 || \
Packit 631bab
				 (devid) == PCI_CHIP_SANDYBRIDGE_M_GT2 || \
Packit 631bab
				 (devid) == PCI_CHIP_SANDYBRIDGE_M_GT2_PLUS || \
Packit 631bab
				 (devid) == PCI_CHIP_SANDYBRIDGE_S)
Packit 631bab
Packit 631bab
#define IS_GEN7(devid)		(IS_IVYBRIDGE(devid) || \
Packit 631bab
				 IS_HASWELL(devid) || \
Packit 631bab
				 IS_VALLEYVIEW(devid))
Packit 631bab
Packit 631bab
#define IS_IVYBRIDGE(devid)	((devid) == PCI_CHIP_IVYBRIDGE_GT1 || \
Packit 631bab
				 (devid) == PCI_CHIP_IVYBRIDGE_GT2 || \
Packit 631bab
				 (devid) == PCI_CHIP_IVYBRIDGE_M_GT1 || \
Packit 631bab
				 (devid) == PCI_CHIP_IVYBRIDGE_M_GT2 || \
Packit 631bab
				 (devid) == PCI_CHIP_IVYBRIDGE_S || \
Packit 631bab
				 (devid) == PCI_CHIP_IVYBRIDGE_S_GT2)
Packit 631bab
Packit 631bab
#define IS_VALLEYVIEW(devid)	((devid) == PCI_CHIP_VALLEYVIEW_PO || \
Packit 631bab
				 (devid) == PCI_CHIP_VALLEYVIEW_1 || \
Packit 631bab
				 (devid) == PCI_CHIP_VALLEYVIEW_2 || \
Packit 631bab
				 (devid) == PCI_CHIP_VALLEYVIEW_3)
Packit 631bab
Packit 631bab
#define IS_HSW_GT1(devid)	((devid) == PCI_CHIP_HASWELL_GT1 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_M_GT1 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_S_GT1 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_B_GT1 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_E_GT1 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_SDV_GT1 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_SDV_M_GT1 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_SDV_S_GT1 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_SDV_B_GT1 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_SDV_E_GT1 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_ULT_GT1 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_ULT_M_GT1 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_ULT_S_GT1 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_ULT_B_GT1 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_ULT_E_GT1 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_CRW_GT1 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_CRW_M_GT1 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_CRW_S_GT1 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_CRW_B_GT1 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_CRW_E_GT1)
Packit 631bab
#define IS_HSW_GT2(devid)	((devid) == PCI_CHIP_HASWELL_GT2 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_M_GT2 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_S_GT2 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_B_GT2 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_E_GT2 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_SDV_GT2 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_SDV_M_GT2 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_SDV_S_GT2 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_SDV_B_GT2 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_SDV_E_GT2 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_ULT_GT2 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_ULT_M_GT2 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_ULT_S_GT2 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_ULT_B_GT2 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_ULT_E_GT2 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_CRW_GT2 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_CRW_M_GT2 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_CRW_S_GT2 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_CRW_B_GT2 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_CRW_E_GT2)
Packit 631bab
#define IS_HSW_GT3(devid)	((devid) == PCI_CHIP_HASWELL_GT3 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_M_GT3 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_S_GT3 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_B_GT3 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_E_GT3 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_SDV_GT3 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_SDV_M_GT3 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_SDV_S_GT3 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_SDV_B_GT3 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_SDV_E_GT3 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_ULT_GT3 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_ULT_M_GT3 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_ULT_S_GT3 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_ULT_B_GT3 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_ULT_E_GT3 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_CRW_GT3 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_CRW_M_GT3 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_CRW_S_GT3 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_CRW_B_GT3 || \
Packit 631bab
				 (devid) == PCI_CHIP_HASWELL_CRW_E_GT3)
Packit 631bab
Packit 631bab
#define IS_HASWELL(devid)	(IS_HSW_GT1(devid) || \
Packit 631bab
				 IS_HSW_GT2(devid) || \
Packit 631bab
				 IS_HSW_GT3(devid))
Packit 631bab
Packit 631bab
#define IS_BROADWELL(devid)     (((devid & 0xff00) != 0x1600) ? 0 : \
Packit 631bab
				(((devid & 0x00f0) >> 4) > 3) ? 0 : \
Packit 631bab
				((devid & 0x000f) == BDW_SPARE) ? 1 : \
Packit 631bab
				((devid & 0x000f) == BDW_ULT) ? 1 : \
Packit 631bab
				((devid & 0x000f) == BDW_IRIS) ? 1 : \
Packit 631bab
				((devid & 0x000f) == BDW_SERVER) ? 1 : \
Packit 631bab
				((devid & 0x000f) == BDW_WORKSTATION) ? 1 : \
Packit 631bab
				((devid & 0x000f) == BDW_ULX) ? 1 : 0)
Packit 631bab
Packit 631bab
#define IS_CHERRYVIEW(devid)	((devid) == PCI_CHIP_CHERRYVIEW_0 || \
Packit 631bab
				 (devid) == PCI_CHIP_CHERRYVIEW_1 || \
Packit 631bab
				 (devid) == PCI_CHIP_CHERRYVIEW_2 || \
Packit 631bab
				 (devid) == PCI_CHIP_CHERRYVIEW_3)
Packit 631bab
Packit 631bab
#define IS_GEN8(devid)		(IS_BROADWELL(devid) || \
Packit 631bab
				 IS_CHERRYVIEW(devid))
Packit 631bab
Packit 631bab
/* New platforms use kernel pci ids */
Packit 631bab
#include <stdbool.h>
Packit 631bab
#include <libdrm_macros.h>
Packit 631bab
Packit 631bab
drm_private bool intel_is_genx(unsigned int devid, int gen);
Packit 631bab
drm_private bool intel_get_genx(unsigned int devid, int *gen);
Packit 631bab
Packit 631bab
#define IS_GEN9(devid) intel_is_genx(devid, 9)
Packit 631bab
#define IS_GEN10(devid) intel_is_genx(devid, 10)
Packit 631bab
#define IS_GEN11(devid) intel_is_genx(devid, 11)
Packit 631bab
#define IS_GEN12(devid) intel_is_genx(devid, 12)
Packit 631bab
Packit 631bab
#define IS_9XX(dev)		(IS_GEN3(dev) || \
Packit 631bab
				 IS_GEN4(dev) || \
Packit 631bab
				 IS_GEN5(dev) || \
Packit 631bab
				 IS_GEN6(dev) || \
Packit 631bab
				 IS_GEN7(dev) || \
Packit 631bab
				 IS_GEN8(dev) || \
Packit 631bab
				 intel_get_genx(dev, NULL))
Packit 631bab
Packit 631bab
#endif /* _INTEL_CHIPSET_H */