From: Adam Jackson Date: Fri, 30 Apr 2021 18:43:23 +0000 (-0400) Subject: i915c: Add a symlink for i830_dri.so X-Git-Tag: upstream/21.2.3~3894 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ceba7f695271b514e11b6ec63bff994b45fcbeef;p=platform%2Fupstream%2Fmesa.git i915c: Add a symlink for i830_dri.so 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 Part-of: --- diff --git a/include/pci_ids/i830_pci_ids.h b/include/pci_ids/i830_pci_ids.h new file mode 100644 index 0000000..b04eb48 --- /dev/null +++ b/include/pci_ids/i830_pci_ids.h @@ -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") diff --git a/include/pci_ids/i915_pci_ids.h b/include/pci_ids/i915_pci_ids.h index 1c43c8e..4cd1faf 100644 --- a/include/pci_ids/i915_pci_ids.h +++ b/include/pci_ids/i915_pci_ids.h @@ -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") diff --git a/src/loader/pci_id_driver_map.h b/src/loader/pci_id_driver_map.h index 1dc07be..4129389 100644 --- a/src/loader/pci_id_driver_map.h +++ b/src/loader/pci_id_driver_map.h @@ -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 }, diff --git a/src/mesa/drivers/dri/i915/intel_context.c b/src/mesa/drivers/dri/i915/intel_context.c index 4fe9f4b..a2b0382 100644 --- a/src/mesa/drivers/dri/i915/intel_context.c +++ b/src/mesa/drivers/dri/i915/intel_context.c @@ -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"; diff --git a/src/mesa/drivers/dri/i915/intel_screen.c b/src/mesa/drivers/dri/i915/intel_screen.c index 33ca032..6a4f9cc 100644 --- a/src/mesa/drivers/dri/i915/intel_screen.c +++ b/src/mesa/drivers/dri/i915/intel_screen.c @@ -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; +} diff --git a/src/mesa/drivers/dri/i915/intel_screen.h b/src/mesa/drivers/dri/i915/intel_screen.h index 80f6df4..0327dbc 100644 --- a/src/mesa/drivers/dri/i915/intel_screen.h +++ b/src/mesa/drivers/dri/i915/intel_screen.h @@ -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; diff --git a/src/mesa/drivers/dri/meson.build b/src/mesa/drivers/dri/meson.build index 97210c8..239ca96 100644 --- a/src/mesa/drivers/dri/meson.build +++ b/src/mesa/drivers/dri/meson.build @@ -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