Commit f8474622 authored by Wambui Karuga's avatar Wambui Karuga Committed by Jani Nikula

drm/i915/reset: conversion to new drm logging macros in gt/intel_reset.c

This converts most instances of the printk based drm logging macros in
i915/gt/intel_resect.c to the new struct drm_based logging macros.
Signed-off-by: default avatarWambui Karuga <wambui.karugax@gmail.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20200128071437.9284-4-wambui.karugax@gmail.com
parent 52ce7074
...@@ -72,9 +72,10 @@ static void client_mark_guilty(struct i915_gem_context *ctx, bool banned) ...@@ -72,9 +72,10 @@ static void client_mark_guilty(struct i915_gem_context *ctx, bool banned)
if (score) { if (score) {
atomic_add(score, &file_priv->ban_score); atomic_add(score, &file_priv->ban_score);
DRM_DEBUG_DRIVER("client %s: gained %u ban score, now %u\n", drm_dbg(&ctx->i915->drm,
ctx->name, score, "client %s: gained %u ban score, now %u\n",
atomic_read(&file_priv->ban_score)); ctx->name, score,
atomic_read(&file_priv->ban_score));
} }
} }
...@@ -122,8 +123,8 @@ static bool mark_guilty(struct i915_request *rq) ...@@ -122,8 +123,8 @@ static bool mark_guilty(struct i915_request *rq)
if (time_before(jiffies, prev_hang + CONTEXT_FAST_HANG_JIFFIES)) if (time_before(jiffies, prev_hang + CONTEXT_FAST_HANG_JIFFIES))
banned = true; banned = true;
if (banned) { if (banned) {
DRM_DEBUG_DRIVER("context %s: guilty %d, banned\n", drm_dbg(&ctx->i915->drm, "context %s: guilty %d, banned\n",
ctx->name, atomic_read(&ctx->guilty_count)); ctx->name, atomic_read(&ctx->guilty_count));
intel_context_set_banned(rq->context); intel_context_set_banned(rq->context);
} }
...@@ -226,7 +227,7 @@ static int g4x_do_reset(struct intel_gt *gt, ...@@ -226,7 +227,7 @@ static int g4x_do_reset(struct intel_gt *gt,
GRDOM_MEDIA | GRDOM_RESET_ENABLE); GRDOM_MEDIA | GRDOM_RESET_ENABLE);
ret = wait_for_atomic(g4x_reset_complete(pdev), 50); ret = wait_for_atomic(g4x_reset_complete(pdev), 50);
if (ret) { if (ret) {
DRM_DEBUG_DRIVER("Wait for media reset failed\n"); drm_dbg(&gt->i915->drm, "Wait for media reset failed\n");
goto out; goto out;
} }
...@@ -234,7 +235,7 @@ static int g4x_do_reset(struct intel_gt *gt, ...@@ -234,7 +235,7 @@ static int g4x_do_reset(struct intel_gt *gt,
GRDOM_RENDER | GRDOM_RESET_ENABLE); GRDOM_RENDER | GRDOM_RESET_ENABLE);
ret = wait_for_atomic(g4x_reset_complete(pdev), 50); ret = wait_for_atomic(g4x_reset_complete(pdev), 50);
if (ret) { if (ret) {
DRM_DEBUG_DRIVER("Wait for render reset failed\n"); drm_dbg(&gt->i915->drm, "Wait for render reset failed\n");
goto out; goto out;
} }
...@@ -260,7 +261,7 @@ static int ilk_do_reset(struct intel_gt *gt, intel_engine_mask_t engine_mask, ...@@ -260,7 +261,7 @@ static int ilk_do_reset(struct intel_gt *gt, intel_engine_mask_t engine_mask,
5000, 0, 5000, 0,
NULL); NULL);
if (ret) { if (ret) {
DRM_DEBUG_DRIVER("Wait for render reset failed\n"); drm_dbg(&gt->i915->drm, "Wait for render reset failed\n");
goto out; goto out;
} }
...@@ -271,7 +272,7 @@ static int ilk_do_reset(struct intel_gt *gt, intel_engine_mask_t engine_mask, ...@@ -271,7 +272,7 @@ static int ilk_do_reset(struct intel_gt *gt, intel_engine_mask_t engine_mask,
5000, 0, 5000, 0,
NULL); NULL);
if (ret) { if (ret) {
DRM_DEBUG_DRIVER("Wait for media reset failed\n"); drm_dbg(&gt->i915->drm, "Wait for media reset failed\n");
goto out; goto out;
} }
...@@ -300,8 +301,9 @@ static int gen6_hw_domain_reset(struct intel_gt *gt, u32 hw_domain_mask) ...@@ -300,8 +301,9 @@ static int gen6_hw_domain_reset(struct intel_gt *gt, u32 hw_domain_mask)
500, 0, 500, 0,
NULL); NULL);
if (err) if (err)
DRM_DEBUG_DRIVER("Wait for 0x%08x engines reset failed\n", drm_dbg(&gt->i915->drm,
hw_domain_mask); "Wait for 0x%08x engines reset failed\n",
hw_domain_mask);
return err; return err;
} }
...@@ -401,7 +403,8 @@ static int gen11_lock_sfc(struct intel_engine_cs *engine, u32 *hw_mask) ...@@ -401,7 +403,8 @@ static int gen11_lock_sfc(struct intel_engine_cs *engine, u32 *hw_mask)
return 0; return 0;
if (ret) { if (ret) {
DRM_DEBUG_DRIVER("Wait for SFC forced lock ack failed\n"); drm_dbg(&engine->i915->drm,
"Wait for SFC forced lock ack failed\n");
return ret; return ret;
} }
...@@ -515,9 +518,10 @@ static int gen8_engine_reset_prepare(struct intel_engine_cs *engine) ...@@ -515,9 +518,10 @@ static int gen8_engine_reset_prepare(struct intel_engine_cs *engine)
ret = __intel_wait_for_register_fw(uncore, reg, mask, ack, ret = __intel_wait_for_register_fw(uncore, reg, mask, ack,
700, 0, NULL); 700, 0, NULL);
if (ret) if (ret)
DRM_ERROR("%s reset request timed out: {request: %08x, RESET_CTL: %08x}\n", drm_err(&engine->i915->drm,
engine->name, request, "%s reset request timed out: {request: %08x, RESET_CTL: %08x}\n",
intel_uncore_read_fw(uncore, reg)); engine->name, request,
intel_uncore_read_fw(uncore, reg));
return ret; return ret;
} }
...@@ -1035,7 +1039,7 @@ void intel_gt_reset(struct intel_gt *gt, ...@@ -1035,7 +1039,7 @@ void intel_gt_reset(struct intel_gt *gt,
if (i915_modparams.reset) if (i915_modparams.reset)
dev_err(gt->i915->drm.dev, "GPU reset not supported\n"); dev_err(gt->i915->drm.dev, "GPU reset not supported\n");
else else
DRM_DEBUG_DRIVER("GPU reset disabled\n"); drm_dbg(&gt->i915->drm, "GPU reset disabled\n");
goto error; goto error;
} }
...@@ -1062,8 +1066,9 @@ void intel_gt_reset(struct intel_gt *gt, ...@@ -1062,8 +1066,9 @@ void intel_gt_reset(struct intel_gt *gt,
*/ */
ret = intel_gt_init_hw(gt); ret = intel_gt_init_hw(gt);
if (ret) { if (ret) {
DRM_ERROR("Failed to initialise HW following reset (%d)\n", drm_err(&gt->i915->drm,
ret); "Failed to initialise HW following reset (%d)\n",
ret);
goto taint; goto taint;
} }
...@@ -1139,9 +1144,8 @@ int intel_engine_reset(struct intel_engine_cs *engine, const char *msg) ...@@ -1139,9 +1144,8 @@ int intel_engine_reset(struct intel_engine_cs *engine, const char *msg)
ret = intel_guc_reset_engine(&engine->gt->uc.guc, engine); ret = intel_guc_reset_engine(&engine->gt->uc.guc, engine);
if (ret) { if (ret) {
/* If we fail here, we expect to fallback to a global reset */ /* If we fail here, we expect to fallback to a global reset */
DRM_DEBUG_DRIVER("%sFailed to reset %s, ret=%d\n", drm_dbg(&gt->i915->drm, "%sFailed to reset %s, ret=%d\n",
uses_guc ? "GuC " : "", uses_guc ? "GuC " : "", engine->name, ret);
engine->name, ret);
goto out; goto out;
} }
...@@ -1178,7 +1182,7 @@ static void intel_gt_reset_global(struct intel_gt *gt, ...@@ -1178,7 +1182,7 @@ static void intel_gt_reset_global(struct intel_gt *gt,
kobject_uevent_env(kobj, KOBJ_CHANGE, error_event); kobject_uevent_env(kobj, KOBJ_CHANGE, error_event);
DRM_DEBUG_DRIVER("resetting chip\n"); drm_dbg(&gt->i915->drm, "resetting chip\n");
kobject_uevent_env(kobj, KOBJ_CHANGE, reset_event); kobject_uevent_env(kobj, KOBJ_CHANGE, reset_event);
/* Use a watchdog to ensure that our reset completes */ /* Use a watchdog to ensure that our reset completes */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment