i915c: Add a symlink for i830_dri.so
authorAdam Jackson <ajax@redhat.com>
Fri, 30 Apr 2021 18:43:23 +0000 (14:43 -0400)
committerMarge Bot <eric+marge@anholt.net>
Mon, 3 May 2021 23:03:09 +0000 (23:03 +0000)
The gallium driver doesn't support gen2, so let's make it possible to
keep both i915g and i830 drivers installed in parallel.

Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10554>

include/pci_ids/i830_pci_ids.h [new file with mode: 0644]
include/pci_ids/i915_pci_ids.h
src/loader/pci_id_driver_map.h
src/mesa/drivers/dri/i915/intel_context.c
src/mesa/drivers/dri/i915/intel_screen.c
src/mesa/drivers/dri/i915/intel_screen.h
src/mesa/drivers/dri/meson.build

diff --git a/include/pci_ids/i830_pci_ids.h b/include/pci_ids/i830_pci_ids.h
new file mode 100644 (file)
index 0000000..b04eb48
--- /dev/null
@@ -0,0 +1,4 @@
+CHIPSET(0x3577, I830_M,   "Intel(R) 830M")
+CHIPSET(0x2562, 845_G,    "Intel(R) 845G")
+CHIPSET(0x3582, I855_GM,  "Intel(R) 852GM/855GM")
+CHIPSET(0x2572, I865_G,   "Intel(R) 865G")
index 1c43c8e..4cd1faf 100644 (file)
@@ -1,7 +1,3 @@
-CHIPSET(0x3577, I830_M,   "Intel(R) 830M")
-CHIPSET(0x2562, 845_G,    "Intel(R) 845G")
-CHIPSET(0x3582, I855_GM,  "Intel(R) 852GM/855GM")
-CHIPSET(0x2572, I865_G,   "Intel(R) 865G")
 CHIPSET(0x2582, I915_G,   "Intel(R) 915G")
 CHIPSET(0x258A, E7221_G,  "Intel(R) E7221G (i915)")
 CHIPSET(0x2592, I915_GM,  "Intel(R) 915GM")
index 1dc07be..4129389 100644 (file)
@@ -8,6 +8,12 @@
 #  error "Only include from loader.c"
 #endif
 
+static const int i830_chip_ids[] = {
+#define CHIPSET(chip, desc, name) chip,
+#include "pci_ids/i830_pci_ids.h"
+#undef CHIPSET
+};
+
 static const int i915_chip_ids[] = {
 #define CHIPSET(chip, desc, name) chip,
 #include "pci_ids/i915_pci_ids.h"
@@ -66,6 +72,7 @@ static const struct {
    int num_chips_ids;
    bool (*predicate)(int fd);
 } driver_map[] = {
+   { 0x8086, "i830", i830_chip_ids, ARRAY_SIZE(i830_chip_ids) },
    { 0x8086, "i915", i915_chip_ids, ARRAY_SIZE(i915_chip_ids) },
    { 0x8086, "i965", i965_chip_ids, ARRAY_SIZE(i965_chip_ids) },
    { 0x8086, "iris", NULL, -1, is_kernel_i915 },
index 4fe9f4b..a2b0382 100644 (file)
@@ -72,6 +72,7 @@ i915_get_renderer_string(unsigned deviceID)
    switch (deviceID) {
 #undef CHIPSET
 #define CHIPSET(id, symbol, str) case id: chipset = str; break;
+#include "pci_ids/i830_pci_ids.h"
 #include "pci_ids/i915_pci_ids.h"
    default:
       chipset = "Unknown Intel Chipset";
index 33ca032..6a4f9cc 100644 (file)
@@ -1271,3 +1271,10 @@ PUBLIC const __DRIextension **__driDriverGetExtensions_i915(void)
 
    return i915_driver_extensions;
 }
+
+PUBLIC const __DRIextension **__driDriverGetExtensions_i830(void)
+{
+   globalDriverAPI = &i915_driver_api;
+
+   return i915_driver_extensions;
+}
index 80f6df4..0327dbc 100644 (file)
@@ -158,6 +158,7 @@ extern void intelDestroyContext(__DRIcontext * driContextPriv);
 
 extern GLboolean intelUnbindContext(__DRIcontext * driContextPriv);
 
+const __DRIextension **__driDriverGetExtensions_i830(void);
 const __DRIextension **__driDriverGetExtensions_i915(void);
 extern const __DRI2fenceExtension intelFenceExtension;
 
index 97210c8..239ca96 100644 (file)
@@ -25,6 +25,7 @@ _dri_link = []
 if with_dri_i915
   subdir('i915')
   _dri_drivers += libi915
+  _dri_link += 'i830_dri.so'
   _dri_link += 'i915_dri.so'
 endif
 if with_dri_i965