use INTEL_INFO for early platform tests in inteldrm_attach()
authorjsg <jsg@openbsd.org>
Mon, 12 Aug 2024 01:49:49 +0000 (01:49 +0000)
committerjsg <jsg@openbsd.org>
Mon, 12 Aug 2024 01:49:49 +0000 (01:49 +0000)
runtime IS_PLATFORM tests are not setup until

inteldrm_attachhook
i915_driver_probe
i915_driver_early_probe
intel_device_info_runtime_init_early
intel_device_info_subplatform_init

sys/dev/pci/drm/i915/i915_driver.c

index df45f22..bf9f27b 100644 (file)
@@ -2309,8 +2309,10 @@ inteldrm_attach(struct device *parent, struct device *self, void *aux)
 
        /* uc_expand_default_options() with no GuC submission */
        if (GRAPHICS_VER(dev_priv) >= 12 &&
-           !IS_TIGERLAKE(dev_priv) && !IS_ROCKETLAKE(dev_priv) &&
-           !IS_XEHPSDV(dev_priv) && !IS_PONTEVECCHIO(dev_priv))
+           (INTEL_INFO(dev_priv)->platform != INTEL_TIGERLAKE) &&
+           (INTEL_INFO(dev_priv)->platform != INTEL_ROCKETLAKE) &&
+           (INTEL_INFO(dev_priv)->platform != INTEL_XEHPSDV) &&
+           (INTEL_INFO(dev_priv)->platform != INTEL_PONTEVECCHIO))
                dev_priv->params.enable_guc = ENABLE_GUC_LOAD_HUC;
 
        mmio_bar = (GRAPHICS_VER(dev_priv) == 2) ? 0x14 : 0x10;