[Intel-gfx] [PATCH 6/6] drm/i915/kbl: Fix DMC load on Kabylake.
Rodrigo Vivi
rodrigo.vivi at intel.com
Tue Oct 27 10:14:59 PDT 2015
Kabylake A0 is based on Skylake H0.
v2: Don't assume revid+7 and only load the one we are sure about.
Signed-off-by: Rodrigo Vivi <rodrigo.vivi at intel.com>
---
drivers/gpu/drm/i915/intel_csr.c | 36 ++++++++++++++++++++++++++++++------
1 file changed, 30 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_csr.c b/drivers/gpu/drm/i915/intel_csr.c
index 9e530a7..e4020ae 100644
--- a/drivers/gpu/drm/i915/intel_csr.c
+++ b/drivers/gpu/drm/i915/intel_csr.c
@@ -190,9 +190,21 @@ static struct stepping_info bxt_stepping_info[] = {
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;
+ int revid = INTEL_REVID(dev);
+
+ /*
+ * FIXME: Kabylake derivated from Skylake H0, so SKL H0
+ * is the right firmware for KBL A0 (revid 0).
+ * We have no visibility yet how next KBL steppings will
+ * be handled by firmware, so let's just add support for
+ * the only current available KBL.
+ */
+ if (IS_KABYLAKE(dev) && revid == 0)
+ return skl_stepping_info[7].stepping;
+
+ if (IS_SKYLAKE(dev) &&
+ revid < ARRAY_SIZE(skl_stepping_info))
+ return skl_stepping_info[revid].stepping;
else if (IS_BROXTON(dev) && (dev->pdev->revision <
ARRAY_SIZE(bxt_stepping_info)))
return bxt_stepping_info[dev->pdev->revision].stepping;
@@ -202,9 +214,21 @@ static char intel_get_stepping(struct drm_device *dev)
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;
+ int revid = INTEL_REVID(dev);
+
+ /*
+ * FIXME: Kabylake derivated from Skylake H0, so SKL H0
+ * is the right firmware for KBL A0 (revid 0).
+ * We have no visibility yet how next KBL steppings will
+ * be handled by firmware, so let's just add support for
+ * the only current available KBL.
+ */
+ if (IS_KABYLAKE(dev) && revid == 0)
+ return skl_stepping_info[7].substepping;
+
+ if (IS_SKYLAKE(dev) &&
+ revid < ARRAY_SIZE(skl_stepping_info))
+ return skl_stepping_info[revid].substepping;
else if (IS_BROXTON(dev) && (dev->pdev->revision <
ARRAY_SIZE(bxt_stepping_info)))
return bxt_stepping_info[dev->pdev->revision].substepping;
--
2.4.3
More information about the Intel-gfx
mailing list