public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/kbl: Fix DMC load on Kabylake.
@ 2015-12-09  1:18 Rodrigo Vivi
  2015-12-09 11:16 ` Jani Nikula
  0 siblings, 1 reply; 7+ messages in thread
From: Rodrigo Vivi @ 2015-12-09  1:18 UTC (permalink / raw)
  To: intel-gfx; +Cc: Rodrigo Vivi

Kabylake A0 is based on Skylake H0.

v2: Don't assume revid+7 and only load the one we are sure about.

v3: Rebase on top of latest changes.

Cc: Imre Deak <imre.deak@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
 drivers/gpu/drm/i915/intel_csr.c | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_csr.c b/drivers/gpu/drm/i915/intel_csr.c
index 6c6a669..7e5ce66 100644
--- a/drivers/gpu/drm/i915/intel_csr.c
+++ b/drivers/gpu/drm/i915/intel_csr.c
@@ -181,8 +181,20 @@ static const struct stepping_info *intel_get_stepping_info(struct drm_device *de
 {
 	const struct stepping_info *si;
 	unsigned int size;
+	int revid = INTEL_REVID(dev);
 
-	if (IS_SKYLAKE(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 load one we know
+	 * it works on the KBLs we have so far add support for
+	 * the only current available KBL.
+	 */
+	if (IS_KABYLAKE(dev))
+		revid = 7;
+
+	if (IS_SKYLAKE(dev) || IS_KABYLAKE(dev)) {
 		size = ARRAY_SIZE(skl_stepping_info);
 		si = skl_stepping_info;
 	} else if (IS_BROXTON(dev)) {
@@ -192,8 +204,8 @@ static const struct stepping_info *intel_get_stepping_info(struct drm_device *de
 		return NULL;
 	}
 
-	if (INTEL_REVID(dev) < size)
-		return si + INTEL_REVID(dev);
+	if (revid < size)
+		return si + revid;
 
 	return NULL;
 }
-- 
2.4.3

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

^ permalink raw reply related	[flat|nested] 7+ messages in thread
* [PATCH 6/6] drm/i915/kbl: Fix DMC load on Kabylake.
@ 2015-10-27 17:14 Rodrigo Vivi
  2015-10-29 17:20 ` [PATCH] " Rodrigo Vivi
  0 siblings, 1 reply; 7+ messages in thread
From: Rodrigo Vivi @ 2015-10-27 17:14 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula, Rodrigo Vivi

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@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

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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2015-12-09 15:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-09  1:18 [PATCH] drm/i915/kbl: Fix DMC load on Kabylake Rodrigo Vivi
2015-12-09 11:16 ` Jani Nikula
2015-12-09 15:17   ` Rodrigo Vivi
2015-12-09 15:34     ` Jani Nikula
  -- strict thread matches above, loose matches on Subject: below --
2015-10-27 17:14 [PATCH 6/6] " Rodrigo Vivi
2015-10-29 17:20 ` [PATCH] " Rodrigo Vivi
2015-10-29 17:58   ` kbuild test robot
2015-10-29 18:05   ` kbuild test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox