@@ -4408,6 +4408,30 @@ DEFINE_SIMPLE_ATTRIBUTE(i915_min_freq_fops,
i915_min_freq_get, i915_min_freq_set,
"%llu\n");
+static int i915_banning_disable_get(void *data, u64 *val)
+{
+ struct drm_device *dev = data;
+ struct drm_i915_private *dev_priv = dev->dev_private;
+
+ *val = dev_priv->gpu_error.banning_disabled;
+
+ return 0;
+}
+
+static int i915_banning_disable_set(void *data, u64 val)
+{
+ struct drm_device *dev = data;
+ struct drm_i915_private *dev_priv = dev->dev_private;
+
+ dev_priv->gpu_error.banning_disabled = (bool)val;
+
+ return 0;
+}
+
+DEFINE_SIMPLE_ATTRIBUTE(i915_banning_disable_fops,
+ i915_banning_disable_get, i915_banning_disable_set,
+ "%llu\n");
+
static int
i915_cache_sharing_get(void *data, u64 *val)
{
@@ -4828,7 +4852,8 @@ static const struct i915_debugfs_files {
{"i915_dp_test_active", &i915_displayport_test_active_fops},
{"i915_guc_log_control", &i915_guc_log_control_fops},
{"i915_hpd_storm_ctl", &i915_hpd_storm_ctl_fops},
- {"i915_ipc_status", &i915_ipc_status_fops}
+ {"i915_ipc_status", &i915_ipc_status_fops},
+ {"i915_banning_disable", &i915_banning_disable_fops},
};
int i915_debugfs_register(struct drm_i915_private *dev_priv)
@@ -1667,6 +1667,8 @@ struct i915_gpu_error {
/* For missed irq/seqno simulation. */
unsigned long test_irq_rings;
+
+ bool banning_disabled;
};
enum modeset_restore {
@@ -2770,7 +2770,8 @@ i915_gem_object_pwrite_gtt(struct drm_i915_gem_object *obj,
static bool ban_context(const struct i915_gem_context *ctx,
unsigned int score)
{
- return (i915_gem_context_is_bannable(ctx) &&
+ return (!ctx->i915->gpu_error.banning_disabled &&
+ i915_gem_context_is_bannable(ctx) &&
score >= CONTEXT_SCORE_BAN_THRESHOLD);
}