[PATCH 62/65] ilk-gt-freq

Chris Wilson chris at chris-wilson.co.uk
Fri Jan 19 20:53:35 UTC 2018


---
 drivers/gpu/drm/i915/intel_gt_pm.c | 16 ++++++++++++++++
 drivers/gpu/drm/i915/intel_pm.c    | 10 ----------
 2 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_gt_pm.c b/drivers/gpu/drm/i915/intel_gt_pm.c
index 12bea0d13075..df9ebb608450 100644
--- a/drivers/gpu/drm/i915/intel_gt_pm.c
+++ b/drivers/gpu/drm/i915/intel_gt_pm.c
@@ -1508,8 +1508,24 @@ static void ilk_init_emon(struct drm_i915_private *dev_priv)
 	dev_priv->gt_pm.ips.corr = (lcfuse & LCFUSE_HIV_MASK);
 }
 
+
+static void ilk_init_frequencies(struct drm_i915_private *i915)
+{
+	struct intel_ips *ips = &i915->gt_pm.ips;
+
+	ips->r_t = i915->mem_freq;
+
+	if (i915->fsb_freq <= 3200)
+		ips->c_m = 0;
+	else if (i915->fsb_freq <= 4800)
+		ips->c_m = 1;
+	else
+		ips->c_m = 2;
+}
+
 static void gen5_init_gt_powersave(struct drm_i915_private *i915)
 {
+	ilk_init_frequencies(i915);
 	ilk_init_emon(i915);
 	ironlake_init_drps(i915);
 }
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index d41986fb7a67..0da7b1080ce1 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -186,8 +186,6 @@ static void i915_ironlake_get_mem_freq(struct drm_i915_private *dev_priv)
 		break;
 	}
 
-	dev_priv->gt_pm.ips.r_t = dev_priv->mem_freq;
-
 	switch (csipll & 0x3ff) {
 	case 0x00c:
 		dev_priv->fsb_freq = 3200;
@@ -216,14 +214,6 @@ static void i915_ironlake_get_mem_freq(struct drm_i915_private *dev_priv)
 		dev_priv->fsb_freq = 0;
 		break;
 	}
-
-	if (dev_priv->fsb_freq == 3200) {
-		dev_priv->gt_pm.ips.c_m = 0;
-	} else if (dev_priv->fsb_freq > 3200 && dev_priv->fsb_freq <= 4800) {
-		dev_priv->gt_pm.ips.c_m = 1;
-	} else {
-		dev_priv->gt_pm.ips.c_m = 2;
-	}
 }
 
 static const struct cxsr_latency cxsr_latency_table[] = {
-- 
2.15.1



More information about the Intel-gfx-trybot mailing list