[PATCH 01/11] drm/i915: Fix subslice configuration on Gen9LP

Tvrtko Ursulin tursulin at ursulin.net
Fri Aug 24 10:40:29 UTC 2018


From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

According to the documentation, when programming the subslice count power-
gating configuration register, the value to be written into it on Gen9LP
should actually be in the format of:

  1 sub-slice  = 0b001
  2 sub-slices = 0b010
  3 sub-slices = 0b100

And not the popcount of the enabled subslice mask as on other platforms.

So on Gen9LP platforms we have been programming 0x11 into those bits, but
the documentation does not explain what would that achieve. Could it be
that we enable only two subslice on three sub-slice parts? Or hardware
simply ignores it and sticks with the maximum configuration?

v2:
 * Commit message fixes. (Lionel)
 * Drop local var.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Cc: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Bspec: 12247
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com> # v1
---
 drivers/gpu/drm/i915/intel_lrc.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 36050f085071..3ebedd0147bc 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -2508,10 +2508,13 @@ make_rpcs(struct drm_i915_private *dev_priv)
 	}
 
 	if (INTEL_INFO(dev_priv)->sseu.has_subslice_pg) {
-		rpcs |= GEN8_RPCS_SS_CNT_ENABLE;
-		rpcs |= hweight8(INTEL_INFO(dev_priv)->sseu.subslice_mask[0]) <<
-			GEN8_RPCS_SS_CNT_SHIFT;
-		rpcs |= GEN8_RPCS_ENABLE;
+		rpcs = hweight8(INTEL_INFO(dev_priv)->sseu.subslice_mask[0]);
+
+		if (IS_GEN9_LP(dev_priv))
+			rpcs = BIT(rpcs - 1);
+
+		rpcs <<= GEN8_RPCS_SS_CNT_SHIFT;
+		rpcs |= GEN8_RPCS_ENABLE | GEN8_RPCS_SS_CNT_ENABLE;
 	}
 
 	if (INTEL_INFO(dev_priv)->sseu.has_eu_pg) {
-- 
2.17.1



More information about the Intel-gfx-trybot mailing list