No need to be overly fancy here.

Cc: Animesh Manna <animesh.ma...@intel.com>
Signed-off-by: Daniel Vetter <daniel.vet...@intel.com>
---
 drivers/gpu/drm/i915/intel_csr.c | 38 +++-----------------------------------
 1 file changed, 3 insertions(+), 35 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_csr.c b/drivers/gpu/drm/i915/intel_csr.c
index 350b36f1237b..6aadd3c7aa22 100644
--- a/drivers/gpu/drm/i915/intel_csr.c
+++ b/drivers/gpu/drm/i915/intel_csr.c
@@ -154,35 +154,6 @@ struct intel_dmc_header {
        uint32_t reserved1[2];
 } __packed;
 
-struct stepping_info {
-       char stepping;
-       char substepping;
-};
-
-static const struct stepping_info skl_stepping_info[] = {
-       {'A', '0'}, {'B', '0'}, {'C', '0'},
-       {'D', '0'}, {'E', '0'}, {'F', '0'},
-       {'G', '0'}, {'H', '0'}, {'I', '0'}
-};
-
-static char intel_get_stepping(struct drm_device *dev)
-{
-       if (IS_SKYLAKE(dev) && (dev->pdev->revision <
-                               ARRAY_SIZE(skl_stepping_info)))
-               return skl_stepping_info[dev->pdev->revision].stepping;
-       else
-               return -ENODATA;
-}
-
-static char intel_get_substepping(struct drm_device *dev)
-{
-       if (IS_SKYLAKE(dev) && (dev->pdev->revision <
-                               ARRAY_SIZE(skl_stepping_info)))
-               return skl_stepping_info[dev->pdev->revision].substepping;
-       else
-               return -ENODATA;
-}
-
 /**
  * intel_csr_load_program() - write the firmware from memory to register.
  * @dev_priv: i915 drm device.
@@ -222,16 +193,13 @@ static uint32_t *parse_csr_fw(struct drm_i915_private 
*dev_priv,
        struct intel_package_header *package_header;
        struct intel_dmc_header *dmc_header;
        struct intel_csr *csr = &dev_priv->csr;
-       char stepping = intel_get_stepping(dev);
-       char substepping = intel_get_substepping(dev);
+       char stepping, substepping;
        uint32_t dmc_offset = CSR_DEFAULT_FW_OFFSET, readcount = 0, nbytes;
        uint32_t i;
        uint32_t *dmc_payload;
 
-       if ((stepping == -ENODATA) || (substepping == -ENODATA)) {
-               DRM_ERROR("Unknown stepping info, firmware loading failed\n");
-               return NULL;
-       }
+       substepping = '0';
+       stepping = 'A' + dev->pdev->revision;
 
        /* Extract CSS Header information*/
        css_header = (struct intel_css_header *)fw->data;
-- 
2.1.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to