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 <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6868>
diff --git a/src/intel/dev/gen_device_info.c b/src/intel/dev/gen_device_info.c
index 4340352..6c75caf 100644
--- a/src/intel/dev/gen_device_info.c
+++ b/src/intel/dev/gen_device_info.c
@@ -39,6 +39,7 @@
    const char *name;
    int pci_id;
 } name_map[] = {
+   { "lpt", 0x27a2 },
    { "brw", 0x2a02 },
    { "g4x", 0x2a42 },
    { "ilk", 0x0042 },
@@ -81,6 +82,11 @@
    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 @@
       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 c4a0860..839e240 100644
--- a/src/intel/tools/intel_noop_drm_shim.c
+++ b/src/intel/tools/intel_noop_drm_shim.c
@@ -142,6 +142,24 @@
       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: