diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2018-02-05 04:22:01 -0500 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2018-02-05 08:24:45 -0500 |
commit | 24eae08d442eb6e9046a6d07abaa3e419bf429d8 (patch) | |
tree | 8971e5bfea34dbb3570f102b98f34aeef57f82c6 | |
parent | 073988d1023276277a3fe148a7a87c8ef3860a98 (diff) |
drm/i915: Remove unbannable context spam from reset
During testing, we trigger a lot of resets on an unbannable context
leading to massive amounts of irrelevant debug spam. Remove the
ban_score accounting and message for the unbannable context so that we
improve the signal:noise in the log messages for when the unexpected
occurs.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180205092201.19476-7-chris@chris-wilson.co.uk
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index dffbe8f7765f..f3cc40a7aa5c 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -2823,24 +2823,23 @@ i915_gem_object_pwrite_gtt(struct drm_i915_gem_object *obj, | |||
2823 | return 0; | 2823 | return 0; |
2824 | } | 2824 | } |
2825 | 2825 | ||
2826 | static bool ban_context(const struct i915_gem_context *ctx, | ||
2827 | unsigned int score) | ||
2828 | { | ||
2829 | return (i915_gem_context_is_bannable(ctx) && | ||
2830 | score >= CONTEXT_SCORE_BAN_THRESHOLD); | ||
2831 | } | ||
2832 | |||
2833 | static void i915_gem_context_mark_guilty(struct i915_gem_context *ctx) | 2826 | static void i915_gem_context_mark_guilty(struct i915_gem_context *ctx) |
2834 | { | 2827 | { |
2835 | unsigned int score; | ||
2836 | bool banned; | 2828 | bool banned; |
2837 | 2829 | ||
2838 | atomic_inc(&ctx->guilty_count); | 2830 | atomic_inc(&ctx->guilty_count); |
2839 | 2831 | ||
2840 | score = atomic_add_return(CONTEXT_SCORE_GUILTY, &ctx->ban_score); | 2832 | banned = false; |
2841 | banned = ban_context(ctx, score); | 2833 | if (i915_gem_context_is_bannable(ctx)) { |
2842 | DRM_DEBUG_DRIVER("context %s marked guilty (score %d) banned? %s\n", | 2834 | unsigned int score; |
2843 | ctx->name, score, yesno(banned)); | 2835 | |
2836 | score = atomic_add_return(CONTEXT_SCORE_GUILTY, | ||
2837 | &ctx->ban_score); | ||
2838 | banned = score >= CONTEXT_SCORE_BAN_THRESHOLD; | ||
2839 | |||
2840 | DRM_DEBUG_DRIVER("context %s marked guilty (score %d) banned? %s\n", | ||
2841 | ctx->name, score, yesno(banned)); | ||
2842 | } | ||
2844 | if (!banned) | 2843 | if (!banned) |
2845 | return; | 2844 | return; |
2846 | 2845 | ||