Commit ecb89c2c authored by Michal Wajdeczko's avatar Michal Wajdeczko Committed by Tvrtko Ursulin

drm/i915/guc: Update GuC messages in intel_guc.c

Use new macros to have common prefix that also include GT#.

v2: drop now redundant "GuC" word from the message
Signed-off-by: default avatarMichal Wajdeczko <michal.wajdeczko@intel.com>
Cc: John Harrison <John.C.Harrison@Intel.com>
Reviewed-by: default avatarJohn Harrison <John.C.Harrison@Intel.com>
Signed-off-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230128195907.1837-3-michal.wajdeczko@intel.com
parent e03a9d40
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include "intel_guc.h" #include "intel_guc.h"
#include "intel_guc_ads.h" #include "intel_guc_ads.h"
#include "intel_guc_capture.h" #include "intel_guc_capture.h"
#include "intel_guc_print.h"
#include "intel_guc_slpc.h" #include "intel_guc_slpc.h"
#include "intel_guc_submission.h" #include "intel_guc_submission.h"
#include "i915_drv.h" #include "i915_drv.h"
...@@ -94,8 +95,8 @@ static void gen9_enable_guc_interrupts(struct intel_guc *guc) ...@@ -94,8 +95,8 @@ static void gen9_enable_guc_interrupts(struct intel_guc *guc)
assert_rpm_wakelock_held(&gt->i915->runtime_pm); assert_rpm_wakelock_held(&gt->i915->runtime_pm);
spin_lock_irq(gt->irq_lock); spin_lock_irq(gt->irq_lock);
WARN_ON_ONCE(intel_uncore_read(gt->uncore, GEN8_GT_IIR(2)) & guc_WARN_ON_ONCE(guc, intel_uncore_read(gt->uncore, GEN8_GT_IIR(2)) &
gt->pm_guc_events); gt->pm_guc_events);
gen6_gt_pm_enable_irq(gt, gt->pm_guc_events); gen6_gt_pm_enable_irq(gt, gt->pm_guc_events);
spin_unlock_irq(gt->irq_lock); spin_unlock_irq(gt->irq_lock);
...@@ -342,7 +343,7 @@ static void guc_init_params(struct intel_guc *guc) ...@@ -342,7 +343,7 @@ static void guc_init_params(struct intel_guc *guc)
params[GUC_CTL_DEVID] = guc_ctl_devid(guc); params[GUC_CTL_DEVID] = guc_ctl_devid(guc);
for (i = 0; i < GUC_CTL_MAX_DWORDS; i++) for (i = 0; i < GUC_CTL_MAX_DWORDS; i++)
DRM_DEBUG_DRIVER("param[%2d] = %#x\n", i, params[i]); guc_dbg(guc, "param[%2d] = %#x\n", i, params[i]);
} }
/* /*
...@@ -389,7 +390,6 @@ void intel_guc_dump_time_info(struct intel_guc *guc, struct drm_printer *p) ...@@ -389,7 +390,6 @@ void intel_guc_dump_time_info(struct intel_guc *guc, struct drm_printer *p)
int intel_guc_init(struct intel_guc *guc) int intel_guc_init(struct intel_guc *guc)
{ {
struct intel_gt *gt = guc_to_gt(guc);
int ret; int ret;
ret = intel_uc_fw_init(&guc->fw); ret = intel_uc_fw_init(&guc->fw);
...@@ -451,7 +451,7 @@ int intel_guc_init(struct intel_guc *guc) ...@@ -451,7 +451,7 @@ int intel_guc_init(struct intel_guc *guc)
intel_uc_fw_fini(&guc->fw); intel_uc_fw_fini(&guc->fw);
out: out:
intel_uc_fw_change_status(&guc->fw, INTEL_UC_FIRMWARE_INIT_FAIL); intel_uc_fw_change_status(&guc->fw, INTEL_UC_FIRMWARE_INIT_FAIL);
i915_probe_error(gt->i915, "failed with %d\n", ret); guc_probe_error(guc, "failed with %pe\n", ERR_PTR(ret));
return ret; return ret;
} }
...@@ -480,7 +480,6 @@ void intel_guc_fini(struct intel_guc *guc) ...@@ -480,7 +480,6 @@ void intel_guc_fini(struct intel_guc *guc)
int intel_guc_send_mmio(struct intel_guc *guc, const u32 *request, u32 len, int intel_guc_send_mmio(struct intel_guc *guc, const u32 *request, u32 len,
u32 *response_buf, u32 response_buf_size) u32 *response_buf, u32 response_buf_size)
{ {
struct drm_i915_private *i915 = guc_to_gt(guc)->i915;
struct intel_uncore *uncore = guc_to_gt(guc)->uncore; struct intel_uncore *uncore = guc_to_gt(guc)->uncore;
u32 header; u32 header;
int i; int i;
...@@ -515,7 +514,7 @@ int intel_guc_send_mmio(struct intel_guc *guc, const u32 *request, u32 len, ...@@ -515,7 +514,7 @@ int intel_guc_send_mmio(struct intel_guc *guc, const u32 *request, u32 len,
10, 10, &header); 10, 10, &header);
if (unlikely(ret)) { if (unlikely(ret)) {
timeout: timeout:
drm_err(&i915->drm, "mmio request %#x: no reply %x\n", guc_err(guc, "mmio request %#x: no reply %x\n",
request[0], header); request[0], header);
goto out; goto out;
} }
...@@ -537,7 +536,7 @@ int intel_guc_send_mmio(struct intel_guc *guc, const u32 *request, u32 len, ...@@ -537,7 +536,7 @@ int intel_guc_send_mmio(struct intel_guc *guc, const u32 *request, u32 len,
if (FIELD_GET(GUC_HXG_MSG_0_TYPE, header) == GUC_HXG_TYPE_NO_RESPONSE_RETRY) { if (FIELD_GET(GUC_HXG_MSG_0_TYPE, header) == GUC_HXG_TYPE_NO_RESPONSE_RETRY) {
u32 reason = FIELD_GET(GUC_HXG_RETRY_MSG_0_REASON, header); u32 reason = FIELD_GET(GUC_HXG_RETRY_MSG_0_REASON, header);
drm_dbg(&i915->drm, "mmio request %#x: retrying, reason %u\n", guc_dbg(guc, "mmio request %#x: retrying, reason %u\n",
request[0], reason); request[0], reason);
goto retry; goto retry;
} }
...@@ -546,7 +545,7 @@ int intel_guc_send_mmio(struct intel_guc *guc, const u32 *request, u32 len, ...@@ -546,7 +545,7 @@ int intel_guc_send_mmio(struct intel_guc *guc, const u32 *request, u32 len,
u32 hint = FIELD_GET(GUC_HXG_FAILURE_MSG_0_HINT, header); u32 hint = FIELD_GET(GUC_HXG_FAILURE_MSG_0_HINT, header);
u32 error = FIELD_GET(GUC_HXG_FAILURE_MSG_0_ERROR, header); u32 error = FIELD_GET(GUC_HXG_FAILURE_MSG_0_ERROR, header);
drm_err(&i915->drm, "mmio request %#x: failure %x/%u\n", guc_err(guc, "mmio request %#x: failure %x/%u\n",
request[0], error, hint); request[0], error, hint);
ret = -ENXIO; ret = -ENXIO;
goto out; goto out;
...@@ -554,7 +553,7 @@ int intel_guc_send_mmio(struct intel_guc *guc, const u32 *request, u32 len, ...@@ -554,7 +553,7 @@ int intel_guc_send_mmio(struct intel_guc *guc, const u32 *request, u32 len,
if (FIELD_GET(GUC_HXG_MSG_0_TYPE, header) != GUC_HXG_TYPE_RESPONSE_SUCCESS) { if (FIELD_GET(GUC_HXG_MSG_0_TYPE, header) != GUC_HXG_TYPE_RESPONSE_SUCCESS) {
proto: proto:
drm_err(&i915->drm, "mmio request %#x: unexpected reply %#x\n", guc_err(guc, "mmio request %#x: unexpected reply %#x\n",
request[0], header); request[0], header);
ret = -EPROTO; ret = -EPROTO;
goto out; goto out;
...@@ -597,9 +596,9 @@ int intel_guc_to_host_process_recv_msg(struct intel_guc *guc, ...@@ -597,9 +596,9 @@ int intel_guc_to_host_process_recv_msg(struct intel_guc *guc,
msg = payload[0] & guc->msg_enabled_mask; msg = payload[0] & guc->msg_enabled_mask;
if (msg & INTEL_GUC_RECV_MSG_CRASH_DUMP_POSTED) if (msg & INTEL_GUC_RECV_MSG_CRASH_DUMP_POSTED)
drm_err(&guc_to_gt(guc)->i915->drm, "Received early GuC crash dump notification!\n"); guc_err(guc, "Received early crash dump notification!\n");
if (msg & INTEL_GUC_RECV_MSG_EXCEPTION) if (msg & INTEL_GUC_RECV_MSG_EXCEPTION)
drm_err(&guc_to_gt(guc)->i915->drm, "Received early GuC exception notification!\n"); guc_err(guc, "Received early exception notification!\n");
return 0; return 0;
} }
...@@ -653,7 +652,8 @@ int intel_guc_suspend(struct intel_guc *guc) ...@@ -653,7 +652,8 @@ int intel_guc_suspend(struct intel_guc *guc)
*/ */
ret = intel_guc_send_mmio(guc, action, ARRAY_SIZE(action), NULL, 0); ret = intel_guc_send_mmio(guc, action, ARRAY_SIZE(action), NULL, 0);
if (ret) if (ret)
DRM_ERROR("GuC suspend: RESET_CLIENT action failed with error %d!\n", ret); guc_err(guc, "suspend: RESET_CLIENT action failed with %pe\n",
ERR_PTR(ret));
} }
/* Signal that the GuC isn't running. */ /* Signal that the GuC isn't running. */
...@@ -828,12 +828,11 @@ static int __guc_action_self_cfg(struct intel_guc *guc, u16 key, u16 len, u64 va ...@@ -828,12 +828,11 @@ static int __guc_action_self_cfg(struct intel_guc *guc, u16 key, u16 len, u64 va
static int __guc_self_cfg(struct intel_guc *guc, u16 key, u16 len, u64 value) static int __guc_self_cfg(struct intel_guc *guc, u16 key, u16 len, u64 value)
{ {
struct drm_i915_private *i915 = guc_to_gt(guc)->i915;
int err = __guc_action_self_cfg(guc, key, len, value); int err = __guc_action_self_cfg(guc, key, len, value);
if (unlikely(err)) if (unlikely(err))
i915_probe_error(i915, "Unsuccessful self-config (%pe) key %#hx value %#llx\n", guc_probe_error(guc, "Unsuccessful self-config (%pe) key %#hx value %#llx\n",
ERR_PTR(err), key, value); ERR_PTR(err), key, value);
return err; return err;
} }
......
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