[Intel-gfx] [PATCH v3 23/27] drm/i915/slpc: Only Enable GTPERF, Disable DCC, Balancer, IBC, FPS Stall

Sagar Arun Kamble sagar.a.kamble at intel.com
Tue Aug 23 10:39:56 UTC 2016


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

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   | 30 ++++++++++++++++++++++++++++++
 drivers/gpu/drm/i915/intel_slpc.h   |  5 +++++
 3 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 8d0171f..340a781 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -1137,7 +1137,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 86037f9..fd409c2 100644
--- a/drivers/gpu/drm/i915/intel_slpc.c
+++ b/drivers/gpu/drm/i915/intel_slpc.c
@@ -301,8 +301,38 @@ 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);
 	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_DISABLE_IA_GT_BALANCING,
+			     1);
+
+	intel_slpc_set_param(dev_priv,
+			     SLPC_PARAM_DFPS_THRESHOLD_MAX_FPS,
+			     0);
+
+	intel_slpc_set_param(dev_priv,
+			     SLPC_PARAM_DFPS_DISABLE_FRAMERATE_STALLING,
+			     1);
+
 }
 
 void intel_slpc_reset(struct drm_i915_private *dev_priv)
diff --git a/drivers/gpu/drm/i915/intel_slpc.h b/drivers/gpu/drm/i915/intel_slpc.h
index e236d9d..a2161b0b 100644
--- a/drivers/gpu/drm/i915/intel_slpc.h
+++ b/drivers/gpu/drm/i915/intel_slpc.h
@@ -184,4 +184,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