From: Chris Wilson Date: Fri, 21 Jul 2017 12:32:31 +0000 (+0100) Subject: drm/i915: Emit a user level message when resetting the GPU (or engine) X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7367612fe1eae573d86fc273a29af0797bfb918f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git drm/i915: Emit a user level message when resetting the GPU (or engine) Although a banned context will be told to -EIO off if they try to submit more requests, we have a discrepancy between whole device resets and per-engine resets where we report the GPU reset but not the engine resets. This leaves a bit of mystery as to why the context was banned, and also reduces awareness overall of when a GPU (engine) reset occurs with its possible side-effects. Signed-off-by: Chris Wilson Cc: Michel Thierry Cc: Mika Kuoppala Reviewed-by: Michel Thierry Link: https://patchwork.freedesktop.org/patch/msgid/20170721123238.16428-13-chris@chris-wilson.co.uk Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 6753fc861dbb..3ac8215c0e36 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -1861,9 +1861,10 @@ void i915_reset(struct drm_i915_private *dev_priv) if (!i915_gem_unset_wedged(dev_priv)) goto wakeup; + dev_notice(dev_priv->drm.dev, + "Resetting chip after gpu hang\n"); error->reset_count++; - pr_notice("drm/i915: Resetting chip after gpu hang\n"); disable_irq(dev_priv->drm.irq); ret = i915_gem_reset_prepare(dev_priv); if (ret) { @@ -1941,7 +1942,9 @@ int i915_reset_engine(struct intel_engine_cs *engine) GEM_BUG_ON(!test_bit(I915_RESET_ENGINE + engine->id, &error->flags)); - DRM_DEBUG_DRIVER("resetting %s\n", engine->name); + dev_notice(engine->i915->drm.dev, + "Resetting %s after gpu hang\n", engine->name); + error->reset_engine_count[engine->id]++; active_request = i915_gem_reset_prepare_engine(engine); if (IS_ERR(active_request)) { @@ -1974,7 +1977,6 @@ int i915_reset_engine(struct intel_engine_cs *engine) if (ret) goto out; - error->reset_engine_count[engine->id]++; out: i915_gem_reset_finish_engine(engine); return ret;