Just in case, the full listing of the patch file:
--- intel_csr.c.orig 2020-02-14 15:34:58.000000000 +0100
+++ intel_csr.c 2021-04-04 12:41:15.467350912 +0200
@@ -49,7 +49,7 @@
#define I915_CSR_KBL "i915/kbl_dmc_ver1.bin"
#define I915_CSR_SKL "i915/skl_dmc_ver1.bin"
-#define I915_CSR_BXT "i915/bxt_dmc_ver1.bin"
+#define I915_CSR_BXT "i915/bxt_dmc_ver1_07.bin"
MODULE_FIRMWARE(I915_CSR_KBL);
MODULE_FIRMWARE(I915_CSR_SKL);
@@ -205,34 +205,41 @@
{'B', '0'}, {'B', '1'}, {'B', '2'}
};
+static const struct stepping_info no_stepping_info = { '*', '*' };
+
+static const struct stepping_info *
+intel_get_stepping_info(struct drm_device *dev)
+{
+ const struct stepping_info *si;
+ unsigned int size;
+
+ if (IS_KABYLAKE(dev)) {
+ size = ARRAY_SIZE(kbl_stepping_info);
+ si = kbl_stepping_info;
+ } else if (IS_SKYLAKE(dev)) {
+ size = ARRAY_SIZE(skl_stepping_info);
+ si = skl_stepping_info;
+ } else if (IS_BROXTON(dev)) {
+ size = ARRAY_SIZE(bxt_stepping_info);
+ si = bxt_stepping_info;
+ } else {
+ size = 0;
+ }
+
+ if (dev->pdev->revision < size)
+ return si + dev->pdev->revision;
+
+ return &no_stepping_info;
+}
+
static char intel_get_stepping(struct drm_device *dev)
{
- if (IS_KABYLAKE(dev) && (dev->pdev->revision <
- ARRAY_SIZE(kbl_stepping_info)))
- return kbl_stepping_info[dev->pdev->revision].stepping;
- else if (IS_SKYLAKE(dev) && (dev->pdev->revision <
- ARRAY_SIZE(skl_stepping_info)))
- return skl_stepping_info[dev->pdev->revision].stepping;
- else if (IS_BROXTON(dev) && (dev->pdev->revision <
- ARRAY_SIZE(bxt_stepping_info)))
- return bxt_stepping_info[dev->pdev->revision].stepping;
- else
- return -ENODATA;
+ return intel_get_stepping_info(dev)->stepping;
}
static char intel_get_substepping(struct drm_device *dev)
{
- if (IS_KABYLAKE(dev) && (dev->pdev->revision <
- ARRAY_SIZE(kbl_stepping_info)))
- return kbl_stepping_info[dev->pdev->revision].substepping;
- else if (IS_SKYLAKE(dev) && (dev->pdev->revision <
- ARRAY_SIZE(skl_stepping_info)))
- return skl_stepping_info[dev->pdev->revision].substepping;
- else if (IS_BROXTON(dev) && (dev->pdev->revision <
- ARRAY_SIZE(bxt_stepping_info)))
- return bxt_stepping_info[dev->pdev->revision].substepping;
- else
- return -ENODATA;
+ return intel_get_stepping_info(dev)->substepping;
}
/**
@@ -331,11 +338,6 @@
goto out;
}
- if ((stepping == -ENODATA) || (substepping == -ENODATA)) {
- DRM_ERROR("Unknown stepping info, firmware loading failed\n");
- goto out;
- }
-
/* Extract CSS Header information*/
css_header = (struct intel_css_header *)fw->data;
if (sizeof(struct intel_css_header) !=