[Intel-gfx] [PATCH v4 20/25] drm/i915/slpc: Only Enable GTPERF, Disable DCC, Balancer, IBC, FPS Stall

Sagar Arun Kamble sagar.a.kamble at intel.com
Wed Sep 7 08:22:58 UTC 2016


v1: Updated tasks and frequency post reset.
    Added DFPS param update for MAX_FPS and FPS Stall.

v2-v3: Rebase.

v4: Updated with GuC firmware v9.

Signed-off-by: Sagar Arun Kamble <sagar.a.kamble at intel.com>
---
 drivers/gpu/drm/i915/i915_debugfs.c |  2 +-
 drivers/gpu/drm/i915/intel_slpc.c   | 41 +++++++++++++++++++++++++++++++++++++
 drivers/gpu/drm/i915/intel_slpc.h   |  5 +++++
 3 files changed, 47 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 9efae32..522e49d 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -1114,7 +1114,7 @@ static int slpc_enable_disable_get(struct drm_device *dev, u64 *val,
 	return ret;
 }
 
-static int slpc_enable_disable_set(struct drm_device *dev, u64 val,
+int slpc_enable_disable_set(struct drm_device *dev, u64 val,
 				   enum slpc_param_id enable_id,
 				   enum slpc_param_id disable_id)
 {
diff --git a/drivers/gpu/drm/i915/intel_slpc.c b/drivers/gpu/drm/i915/intel_slpc.c
index 4683294..60b3aaf 100644
--- a/drivers/gpu/drm/i915/intel_slpc.c
+++ b/drivers/gpu/drm/i915/intel_slpc.c
@@ -295,7 +295,48 @@ void intel_slpc_disable(struct drm_i915_private *dev_priv)
 
 void intel_slpc_enable(struct drm_i915_private *dev_priv)
 {
+	u64 val;
+
 	host2guc_slpc_reset(dev_priv);
 	DRM_INFO("SLPC Enabled\n");
 	dev_priv->guc.slpc.enabled = true;
+
+	/* Enable only GTPERF task, Disable others */
+	val = SLPC_PARAM_TASK_ENABLED;
+	slpc_enable_disable_set(&dev_priv->drm, val,
+				SLPC_PARAM_TASK_ENABLE_GTPERF,
+				SLPC_PARAM_TASK_DISABLE_GTPERF);
+
+	val = SLPC_PARAM_TASK_DISABLED;
+	slpc_enable_disable_set(&dev_priv->drm, val,
+				SLPC_PARAM_TASK_ENABLE_BALANCER,
+				SLPC_PARAM_TASK_DISABLE_BALANCER);
+
+	slpc_enable_disable_set(&dev_priv->drm, val,
+				SLPC_PARAM_TASK_ENABLE_DCC,
+				SLPC_PARAM_TASK_DISABLE_DCC);
+
+	intel_slpc_set_param(dev_priv,
+			     SLPC_PARAM_GLOBAL_ENABLE_IA_GT_BALANCING,
+			     0);
+
+	intel_slpc_set_param(dev_priv,
+			     SLPC_PARAM_GTPERF_THRESHOLD_MAX_FPS,
+			     0);
+
+	intel_slpc_set_param(dev_priv,
+			     SLPC_PARAM_GTPERF_ENABLE_FRAMERATE_STALLING,
+			     0);
+
+	intel_slpc_set_param(dev_priv,
+			     SLPC_PARAM_GLOBAL_ENABLE_ADAPTIVE_BURST_TURBO,
+			     0);
+
+	intel_slpc_set_param(dev_priv,
+			     SLPC_PARAM_GLOBAL_ENABLE_EVAL_MODE,
+			     0);
+
+	intel_slpc_set_param(dev_priv,
+			     SLPC_PARAM_GLOBAL_ENABLE_BALANCER_IN_NON_GAMING_MODE,
+			     0);
 }
diff --git a/drivers/gpu/drm/i915/intel_slpc.h b/drivers/gpu/drm/i915/intel_slpc.h
index cc43194..8436965 100644
--- a/drivers/gpu/drm/i915/intel_slpc.h
+++ b/drivers/gpu/drm/i915/intel_slpc.h
@@ -206,4 +206,9 @@ void intel_slpc_get_param(struct drm_i915_private *dev_priv,
 			  enum slpc_param_id id,
 			  int *overriding, u32 *value);
 void intel_slpc_query_task_state(struct drm_i915_private *dev_priv);
+
+/* i915_debugfs.c */
+int slpc_enable_disable_set(struct drm_device *dev, u64 val,
+			    enum slpc_param_id enable_id,
+			    enum slpc_param_id disable_id);
 #endif
-- 
1.9.1



More information about the Intel-gfx mailing list