Blame SOURCES/0001-mustard-Don-t-probe-for-drivers-not-shipped-in-RHEL8.patch

98b35a
From b6e50ece375b6b1fbe053b30b52fc40dde5c682b Mon Sep 17 00:00:00 2001
98b35a
From: Adam Jackson <ajax@redhat.com>
98b35a
Date: Tue, 13 Nov 2018 10:11:36 -0500
98b35a
Subject: [PATCH] mustard: Don't probe for drivers not shipped in RHEL8
98b35a
98b35a
As with RHEL7, this is mostly to keep spurious probe messages out of the
98b35a
X log and prevent questions like "why isn't it loading mga on my
98b35a
G200SE" or "why isn't it loading radeon_dri.so on my RN50".
98b35a
---
98b35a
 hw/xfree86/common/xf86pciBus.c              | 162 --------------------
98b35a
 hw/xfree86/dri2/pci_ids/pci_id_driver_map.h |  32 ----
98b35a
 2 files changed, 194 deletions(-)
98b35a
98b35a
diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c
98b35a
index b7f9999..398ed45 100644
98b35a
--- a/hw/xfree86/common/xf86pciBus.c
98b35a
+++ b/hw/xfree86/common/xf86pciBus.c
98b35a
@@ -1074,107 +1074,12 @@ xf86VideoPtrToDriverList(struct pci_device *dev, XF86MatchedDrivers *md)
98b35a
     const char *driverList[5] = { NULL, NULL, NULL, NULL, NULL };
98b35a
 
98b35a
     switch (dev->vendor_id) {
98b35a
-        /* AMD Geode LX */
98b35a
-    case 0x1022:
98b35a
-        if (dev->device_id == 0x2081)
98b35a
-            driverList[0] = "geode";
98b35a
-        break;
98b35a
-        /* older Geode products acquired by AMD still carry an NSC vendor_id */
98b35a
-    case 0x100b:
98b35a
-        if (dev->device_id == 0x0030) {
98b35a
-            /* NSC Geode GX2 specifically */
98b35a
-            driverList[0] = "geode";
98b35a
-            /* GX2 support started its life in the NSC tree and was later
98b35a
-               forked by AMD for GEODE so we keep it as a backup */
98b35a
-            driverList[1] = "nsc";
98b35a
-        }
98b35a
-        else
98b35a
-            /* other NSC variant e.g. 0x0104 (SC1400), 0x0504 (SCx200) */
98b35a
-            driverList[0] = "nsc";
98b35a
-        break;
98b35a
-        /* Cyrix Geode GX1 */
98b35a
-    case 0x1078:
98b35a
-        if (dev->device_id == 0x0104)
98b35a
-            driverList[0] = "cyrix";
98b35a
-        break;
98b35a
-    case 0x1142:
98b35a
-        driverList[0] = "apm";
98b35a
-        break;
98b35a
-    case 0xedd8:
98b35a
-        driverList[0] = "ark";
98b35a
-        break;
98b35a
-    case 0x1a03:
98b35a
-        driverList[0] = "ast";
98b35a
-        break;
98b35a
     case 0x1002:
98b35a
         driverList[0] = "ati";
98b35a
         break;
98b35a
-    case 0x102c:
98b35a
-        driverList[0] = "chips";
98b35a
-        break;
98b35a
-    case 0x1013:
98b35a
-        driverList[0] = "cirrus";
98b35a
-        break;
98b35a
-    case 0x3d3d:
98b35a
-        driverList[0] = "glint";
98b35a
-        break;
98b35a
-    case 0x105d:
98b35a
-        driverList[0] = "i128";
98b35a
-        break;
98b35a
     case 0x8086:
98b35a
 	switch (dev->device_id)
98b35a
 	{
98b35a
-		/* Intel i740 */
98b35a
-		case 0x00d1:
98b35a
-		case 0x7800:
98b35a
-			driverList[0] = "i740";
98b35a
-			break;
98b35a
-		/* GMA500/Poulsbo */
98b35a
-		case 0x8108:
98b35a
-		case 0x8109:
98b35a
-			/* Try psb driver on Poulsbo - if available */
98b35a
-			driverList[0] = "psb";
98b35a
-			driverList[1] = "psb_drv";
98b35a
-			break;
98b35a
-		/* GMA600/Oaktrail */
98b35a
-		case 0x4100:
98b35a
-		case 0x4101:
98b35a
-		case 0x4102:
98b35a
-		case 0x4103:
98b35a
-		case 0x4104:
98b35a
-		case 0x4105:
98b35a
-		case 0x4106:
98b35a
-		case 0x4107:
98b35a
-		/* Atom E620/Oaktrail */
98b35a
-		case 0x4108:
98b35a
-		/* Medfield */
98b35a
-		case 0x0130:
98b35a
-		case 0x0131:
98b35a
-		case 0x0132:
98b35a
-		case 0x0133:
98b35a
-		case 0x0134:
98b35a
-		case 0x0135:
98b35a
-		case 0x0136:
98b35a
-		case 0x0137:
98b35a
-		/* GMA 3600/CDV */
98b35a
-		case 0x0be0:
98b35a
-		case 0x0be1:
98b35a
-		case 0x0be2:
98b35a
-		case 0x0be3:
98b35a
-		case 0x0be4:
98b35a
-		case 0x0be5:
98b35a
-		case 0x0be6:
98b35a
-		case 0x0be7:
98b35a
-		case 0x0be8:
98b35a
-		case 0x0be9:
98b35a
-		case 0x0bea:
98b35a
-		case 0x0beb:
98b35a
-		case 0x0bec:
98b35a
-		case 0x0bed:
98b35a
-		case 0x0bee:
98b35a
-		case 0x0bef:
98b35a
-			/* Use fbdev/vesa driver on Oaktrail, Medfield, CDV */
98b35a
-			break;
98b35a
 		/* Default to intel only on pre-gen4 chips */
98b35a
 		case 0x3577:
98b35a
 		case 0x2562:
98b35a
@@ -1196,14 +1101,7 @@ xf86VideoPtrToDriverList(struct pci_device *dev, XF86MatchedDrivers *md)
98b35a
 			break;
98b35a
         }
98b35a
         break;
98b35a
-    case 0x102b:
98b35a
-        driverList[0] = "mga";
98b35a
-        break;
98b35a
-    case 0x10c8:
98b35a
-        driverList[0] = "neomagic";
98b35a
-        break;
98b35a
     case 0x10de:
98b35a
-    case 0x12d2:
98b35a
     {
98b35a
         int idx = 0;
98b35a
 
98b35a
@@ -1229,77 +1127,17 @@ xf86VideoPtrToDriverList(struct pci_device *dev, XF86MatchedDrivers *md)
98b35a
 
98b35a
         driverList[idx++] = "nouveau";
98b35a
 #endif
98b35a
-        driverList[idx++] = "nv";
98b35a
         break;
98b35a
     }
98b35a
-    case 0x1106:
98b35a
-        driverList[0] = "openchrome";
98b35a
-        break;
98b35a
     case 0x1b36:
98b35a
         driverList[0] = "qxl";
98b35a
         break;
98b35a
-    case 0x1163:
98b35a
-        driverList[0] = "rendition";
98b35a
-        break;
98b35a
-    case 0x5333:
98b35a
-        switch (dev->device_id) {
98b35a
-        case 0x88d0:
98b35a
-        case 0x88d1:
98b35a
-        case 0x88f0:
98b35a
-        case 0x8811:
98b35a
-        case 0x8812:
98b35a
-        case 0x8814:
98b35a
-        case 0x8901:
98b35a
-            driverList[0] = "s3";
98b35a
-            break;
98b35a
-        case 0x5631:
98b35a
-        case 0x883d:
98b35a
-        case 0x8a01:
98b35a
-        case 0x8a10:
98b35a
-        case 0x8c01:
98b35a
-        case 0x8c03:
98b35a
-        case 0x8904:
98b35a
-        case 0x8a13:
98b35a
-            driverList[0] = "s3virge";
98b35a
-            break;
98b35a
-        default:
98b35a
-            driverList[0] = "savage";
98b35a
-            break;
98b35a
-        }
98b35a
-        break;
98b35a
-    case 0x1039:
98b35a
-        driverList[0] = "sis";
98b35a
-        break;
98b35a
-    case 0x126f:
98b35a
-        driverList[0] = "siliconmotion";
98b35a
-        break;
98b35a
-    case 0x121a:
98b35a
-        if (dev->device_id < 0x0003)
98b35a
-            driverList[0] = "voodoo";
98b35a
-        else
98b35a
-            driverList[0] = "tdfx";
98b35a
-        break;
98b35a
-    case 0x1011:
98b35a
-        driverList[0] = "tga";
98b35a
-        break;
98b35a
-    case 0x1023:
98b35a
-        driverList[0] = "trident";
98b35a
-        break;
98b35a
-    case 0x100c:
98b35a
-        driverList[0] = "tseng";
98b35a
-        break;
98b35a
     case 0x80ee:
98b35a
         driverList[0] = "vboxvideo";
98b35a
         break;
98b35a
     case 0x15ad:
98b35a
         driverList[0] = "vmware";
98b35a
         break;
98b35a
-    case 0x18ca:
98b35a
-        if (dev->device_id == 0x47)
98b35a
-            driverList[0] = "xgixp";
98b35a
-        else
98b35a
-            driverList[0] = "xgi";
98b35a
-        break;
98b35a
     default:
98b35a
         break;
98b35a
     }
98b35a
diff --git a/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h b/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h
98b35a
index 7036d10..689a570 100644
98b35a
--- a/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h
98b35a
+++ b/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h
98b35a
@@ -7,38 +7,12 @@
98b35a
 #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0]))
98b35a
 #endif
98b35a
 
98b35a
-static const int i915_chip_ids[] = {
98b35a
-#define CHIPSET(chip, desc, name) chip,
98b35a
-#include "pci_ids/i915_pci_ids.h"
98b35a
-#undef CHIPSET
98b35a
-};
98b35a
-
98b35a
 static const int i965_chip_ids[] = {
98b35a
 #define CHIPSET(chip, family, name) chip,
98b35a
 #include "pci_ids/i965_pci_ids.h"
98b35a
 #undef CHIPSET
98b35a
 };
98b35a
 
98b35a
-#ifndef DRIVER_MAP_GALLIUM_ONLY
98b35a
-static const int r100_chip_ids[] = {
98b35a
-#define CHIPSET(chip, name, family) chip,
98b35a
-#include "pci_ids/radeon_pci_ids.h"
98b35a
-#undef CHIPSET
98b35a
-};
98b35a
-
98b35a
-static const int r200_chip_ids[] = {
98b35a
-#define CHIPSET(chip, name, family) chip,
98b35a
-#include "pci_ids/r200_pci_ids.h"
98b35a
-#undef CHIPSET
98b35a
-};
98b35a
-#endif
98b35a
-
98b35a
-static const int r300_chip_ids[] = {
98b35a
-#define CHIPSET(chip, name, family) chip,
98b35a
-#include "pci_ids/r300_pci_ids.h"
98b35a
-#undef CHIPSET
98b35a
-};
98b35a
-
98b35a
 static const int r600_chip_ids[] = {
98b35a
 #define CHIPSET(chip, name, family) chip,
98b35a
 #include "pci_ids/r600_pci_ids.h"
98b35a
@@ -70,13 +44,7 @@ static const struct {
98b35a
    const int *chip_ids;
98b35a
    int num_chips_ids;
98b35a
 } driver_map[] = {
98b35a
-   { 0x8086, "i915", "i915", i915_chip_ids, ARRAY_SIZE(i915_chip_ids) },
98b35a
    { 0x8086, "i965", "va_gl", i965_chip_ids, ARRAY_SIZE(i965_chip_ids) },
98b35a
-#ifndef DRIVER_MAP_GALLIUM_ONLY
98b35a
-   { 0x1002, "radeon", "radeon", r100_chip_ids, ARRAY_SIZE(r100_chip_ids) },
98b35a
-   { 0x1002, "r200", "r200", r200_chip_ids, ARRAY_SIZE(r200_chip_ids) },
98b35a
-#endif
98b35a
-   { 0x1002, "r300", "r300", r300_chip_ids, ARRAY_SIZE(r300_chip_ids) },
98b35a
    { 0x1002, "r600","r600",  r600_chip_ids, ARRAY_SIZE(r600_chip_ids) },
98b35a
    { 0x1002, "radeonsi", "radeonsi", radeonsi_chip_ids, ARRAY_SIZE(radeonsi_chip_ids) },
98b35a
    { 0x10de, "nouveau", "nouveau", NULL, -1 },
98b35a
-- 
98b35a
2.19.1
98b35a