[Intel-gfx] drm/i915/slpc: Only Enable GTPERF, Disable DCC, Balancer, IBC, FPS Stall
Sagar Arun Kamble
sagar.a.kamble at intel.com
Sat Aug 20 05:09:22 UTC 2016
v2: Updated tasks and frequency post reset.
v3: 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 | 29 +++++++++++++++++++++++++++++
drivers/gpu/drm/i915/intel_slpc.h | 5 +++++
3 files changed, 35 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index cfe6dac..0efb3f8 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -1140,7 +1140,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 bf0840a..4356dfa 100644
--- a/drivers/gpu/drm/i915/intel_slpc.c
+++ b/drivers/gpu/drm/i915/intel_slpc.c
@@ -292,9 +292,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);
+
return;
}
diff --git a/drivers/gpu/drm/i915/intel_slpc.h b/drivers/gpu/drm/i915/intel_slpc.h
index 3d2e4ce..a1e573e 100644
--- a/drivers/gpu/drm/i915/intel_slpc.h
+++ b/drivers/gpu/drm/i915/intel_slpc.h
@@ -181,4 +181,9 @@ void intel_slpc_set_param(struct drm_i915_private *dev_priv, enum slpc_param_id
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