Commit f5df4d88 authored by Vinay Belgaumkar's avatar Vinay Belgaumkar Committed by Matt Roper

drm/i915/guc/slpc: Use i915_probe_error instead of drm_err

This will ensure we don't have false positives when we run
error injection tests.
Signed-off-by: default avatarVinay Belgaumkar <vinay.belgaumkar@intel.com>
Reviewed-by: default avatarAnshuman Gupta <anshuman.gupta@intel.com>
Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220412224852.21501-1-vinay.belgaumkar@intel.com
parent c94fde8f
......@@ -152,7 +152,7 @@ static int slpc_query_task_state(struct intel_guc_slpc *slpc)
ret = guc_action_slpc_query(guc, offset);
if (unlikely(ret))
drm_err(&i915->drm, "Failed to query task state (%pe)\n",
i915_probe_error(i915, "Failed to query task state (%pe)\n",
ERR_PTR(ret));
drm_clflush_virt_range(slpc->vaddr, SLPC_PAGE_SIZE_BYTES);
......@@ -170,7 +170,7 @@ static int slpc_set_param(struct intel_guc_slpc *slpc, u8 id, u32 value)
ret = guc_action_slpc_set_param(guc, id, value);
if (ret)
drm_err(&i915->drm, "Failed to set param %d to %u (%pe)\n",
i915_probe_error(i915, "Failed to set param %d to %u (%pe)\n",
id, value, ERR_PTR(ret));
return ret;
......@@ -211,7 +211,7 @@ static int slpc_force_min_freq(struct intel_guc_slpc *slpc, u32 freq)
SLPC_PARAM_GLOBAL_MIN_GT_UNSLICE_FREQ_MHZ,
freq);
if (ret)
drm_err(&i915->drm, "Unable to force min freq to %u: %d",
i915_probe_error(i915, "Unable to force min freq to %u: %d",
freq, ret);
}
......@@ -247,7 +247,7 @@ int intel_guc_slpc_init(struct intel_guc_slpc *slpc)
err = intel_guc_allocate_and_map_vma(guc, size, &slpc->vma, (void **)&slpc->vaddr);
if (unlikely(err)) {
drm_err(&i915->drm,
i915_probe_error(i915,
"Failed to allocate SLPC struct (err=%pe)\n",
ERR_PTR(err));
return err;
......@@ -316,14 +316,14 @@ static int slpc_reset(struct intel_guc_slpc *slpc)
ret = guc_action_slpc_reset(guc, offset);
if (unlikely(ret < 0)) {
drm_err(&i915->drm, "SLPC reset action failed (%pe)\n",
i915_probe_error(i915, "SLPC reset action failed (%pe)\n",
ERR_PTR(ret));
return ret;
}
if (!ret) {
if (wait_for(slpc_is_running(slpc), SLPC_RESET_TIMEOUT_MS)) {
drm_err(&i915->drm, "SLPC not enabled! State = %s\n",
i915_probe_error(i915, "SLPC not enabled! State = %s\n",
slpc_get_state_string(slpc));
return -EIO;
}
......@@ -616,7 +616,7 @@ int intel_guc_slpc_enable(struct intel_guc_slpc *slpc)
ret = slpc_reset(slpc);
if (unlikely(ret < 0)) {
drm_err(&i915->drm, "SLPC Reset event returned (%pe)\n",
i915_probe_error(i915, "SLPC Reset event returned (%pe)\n",
ERR_PTR(ret));
return ret;
}
......@@ -632,7 +632,7 @@ int intel_guc_slpc_enable(struct intel_guc_slpc *slpc)
/* Ignore efficient freq and set min to platform min */
ret = slpc_ignore_eff_freq(slpc, true);
if (unlikely(ret)) {
drm_err(&i915->drm, "Failed to set SLPC min to RPn (%pe)\n",
i915_probe_error(i915, "Failed to set SLPC min to RPn (%pe)\n",
ERR_PTR(ret));
return ret;
}
......@@ -640,7 +640,7 @@ int intel_guc_slpc_enable(struct intel_guc_slpc *slpc)
/* Set SLPC max limit to RP0 */
ret = slpc_use_fused_rp0(slpc);
if (unlikely(ret)) {
drm_err(&i915->drm, "Failed to set SLPC max to RP0 (%pe)\n",
i915_probe_error(i915, "Failed to set SLPC max to RP0 (%pe)\n",
ERR_PTR(ret));
return ret;
}
......@@ -648,7 +648,7 @@ int intel_guc_slpc_enable(struct intel_guc_slpc *slpc)
/* Revert SLPC min/max to softlimits if necessary */
ret = slpc_set_softlimits(slpc);
if (unlikely(ret)) {
drm_err(&i915->drm, "Failed to set SLPC softlimits (%pe)\n",
i915_probe_error(i915, "Failed to set SLPC softlimits (%pe)\n",
ERR_PTR(ret));
return ret;
}
......
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