OSDN Git Service

intel: make gen11 use generic gen macro
authorLucas De Marchi <lucas.demarchi@intel.com>
Wed, 5 Sep 2018 18:31:57 +0000 (11:31 -0700)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Wed, 5 Sep 2018 23:14:27 +0000 (16:14 -0700)
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
intel/intel_chipset.c
intel/intel_chipset.h

index 545819a..a960b75 100644 (file)
@@ -35,6 +35,7 @@ static const struct pci_device {
        uint16_t gen;
 } pciids[] = {
        /* Keep ids sorted by gen; latest gen first */
+       INTEL_ICL_11_IDS(11),
 };
 
 bool intel_is_genx(unsigned int devid, int gen)
index e4783d4..db9b53b 100644 (file)
 #define PCI_CHIP_CANNONLAKE_12         0x5A44
 #define PCI_CHIP_CANNONLAKE_13         0x5A4C
 
-#define PCI_CHIP_ICELAKE_11_0          0x8A50
-#define PCI_CHIP_ICELAKE_11_1          0x8A51
-#define PCI_CHIP_ICELAKE_11_2          0x8A5C
-#define PCI_CHIP_ICELAKE_11_3          0x8A5D
-#define PCI_CHIP_ICELAKE_11_4          0x8A52
-#define PCI_CHIP_ICELAKE_11_5          0x8A5A
-#define PCI_CHIP_ICELAKE_11_6          0x8A5B
-#define PCI_CHIP_ICELAKE_11_7          0x8A71
-#define PCI_CHIP_ICELAKE_11_8          0x8A70
-
 #define IS_MOBILE(devid)       ((devid) == PCI_CHIP_I855_GM || \
                                 (devid) == PCI_CHIP_I915_GM || \
                                 (devid) == PCI_CHIP_I945_GM || \
 
 #define IS_GEN10(devid)                (IS_CANNONLAKE(devid))
 
-#define IS_ICELAKE_11(devid)   ((devid) == PCI_CHIP_ICELAKE_11_0 || \
-                                (devid) == PCI_CHIP_ICELAKE_11_1 || \
-                                (devid) == PCI_CHIP_ICELAKE_11_2 || \
-                                (devid) == PCI_CHIP_ICELAKE_11_3 || \
-                                (devid) == PCI_CHIP_ICELAKE_11_4 || \
-                                (devid) == PCI_CHIP_ICELAKE_11_5 || \
-                                (devid) == PCI_CHIP_ICELAKE_11_6 || \
-                                (devid) == PCI_CHIP_ICELAKE_11_7 || \
-                                (devid) == PCI_CHIP_ICELAKE_11_8)
-
-#define IS_ICELAKE(devid)      (IS_ICELAKE_11(devid))
-
-#define IS_GEN11(devid)                (IS_ICELAKE_11(devid))
-
 /* New platforms use kernel pci ids */
 #include <stdbool.h>
 
 bool intel_is_genx(unsigned int devid, int gen);
 bool intel_get_genx(unsigned int devid, int *gen);
 
+#define IS_GEN11(devid) intel_is_genx(devid, 11)
+
 #define IS_9XX(dev)            (IS_GEN3(dev) || \
                                 IS_GEN4(dev) || \
                                 IS_GEN5(dev) || \
@@ -582,7 +560,6 @@ bool intel_get_genx(unsigned int devid, int *gen);
                                 IS_GEN8(dev) || \
                                 IS_GEN9(dev) || \
                                 IS_GEN10(dev) || \
-                                IS_GEN11(dev) || \
                                 intel_get_genx(dev, NULL))
 
 #endif /* _INTEL_CHIPSET_H */