From efaea653b5766427701817ab06c319902a148ee9 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 23 Jul 2020 16:38:28 -0700 Subject: [PATCH] intel: Add support for i945g to intel_stub_gpu. I wanted to check the impact of nir-to-tgsi on the i915g driver, but I don't have an i915 set up. Similarly, for driconf refactoring I needed to make sure that classic i915_dri.so still loaded. Reviewed-by: Lionel Landwerlin Part-of: --- src/intel/dev/gen_device_info.c | 12 ++++++++++++ src/intel/tools/intel_noop_drm_shim.c | 18 ++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/src/intel/dev/gen_device_info.c b/src/intel/dev/gen_device_info.c index 43403525b51..6c75cafd59f 100644 --- a/src/intel/dev/gen_device_info.c +++ b/src/intel/dev/gen_device_info.c @@ -39,6 +39,7 @@ static const struct { const char *name; int pci_id; } name_map[] = { + { "lpt", 0x27a2 }, { "brw", 0x2a02 }, { "g4x", 0x2a42 }, { "ilk", 0x0042 }, @@ -81,6 +82,11 @@ gen_device_name_to_pci_device_id(const char *name) return -1; } +static const struct gen_device_info gen_device_info_gen3 = { + .gen = 3, + .simulator_id = -1, +}; + static const struct gen_device_info gen_device_info_i965 = { .gen = 4, .has_negative_rhw_bug = true, @@ -1255,6 +1261,12 @@ gen_get_device_info_from_pci_id(int pci_id, case id: *devinfo = gen_device_info_##family; break; #include "pci_ids/i965_pci_ids.h" #include "pci_ids/iris_pci_ids.h" + +#undef CHIPSET +#define CHIPSET(id, fam_str, name) \ + case id: *devinfo = gen_device_info_gen3; break; +#include "pci_ids/i915_pci_ids.h" + default: fprintf(stderr, "Driver does not support the 0x%x PCI ID.\n", pci_id); return false; diff --git a/src/intel/tools/intel_noop_drm_shim.c b/src/intel/tools/intel_noop_drm_shim.c index c4a0860f5e5..839e2401db7 100644 --- a/src/intel/tools/intel_noop_drm_shim.c +++ b/src/intel/tools/intel_noop_drm_shim.c @@ -142,6 +142,24 @@ i915_ioctl_get_param(int fd, unsigned long request, void *arg) else *gp->value = I915_GEM_PPGTT_FULL; return 0; + + case I915_PARAM_NUM_FENCES_AVAIL: + *gp->value = 8; /* gen2/3 value, unused in brw/iris */ + return 0; + + case I915_PARAM_HAS_BLT: + *gp->value = 1; /* gen2/3 value, unused in brw/iris */ + return 0; + + case I915_PARAM_HAS_BSD: + case I915_PARAM_HAS_LLC: + case I915_PARAM_HAS_VEBOX: + *gp->value = 0; /* gen2/3 value, unused in brw/iris */ + return 0; + + case I915_PARAM_HAS_GEM: + case I915_PARAM_HAS_RELAXED_DELTA: + case I915_PARAM_HAS_RELAXED_FENCING: case I915_PARAM_HAS_WAIT_TIMEOUT: case I915_PARAM_HAS_EXECBUF2: case I915_PARAM_HAS_EXEC_SOFTPIN: