@@ -664,6 +664,9 @@ static bool guc_process_incoming_requests(struct intel_guc *guc)
len = ct_header_get_len(header) + 1; /* also count header dw */
switch (action) {
+ case INTEL_GUC_ACTION_DEFAULT:
+ intel_guc_process_default_action(guc, request->data[1]);
+ break;
default:
DRM_ERROR("CT: unexpected request %*phn\n",
4*len, request->data);
@@ -597,3 +597,10 @@ int intel_guc_sample_forcewake(struct intel_guc *guc)
return intel_guc_send(guc, action, ARRAY_SIZE(action));
}
+
+void intel_guc_process_default_action(struct intel_guc *guc, u32 msg)
+{
+ if (msg & (INTEL_GUC_RECV_MSG_CRASH_DUMP_POSTED |
+ INTEL_GUC_RECV_MSG_FLUSH_LOG_BUFFER))
+ intel_guc_log_flush(guc);
+}
@@ -230,6 +230,7 @@ void intel_uc_fini_fw(struct drm_i915_private *dev_priv);
int intel_uc_init_hw(struct drm_i915_private *dev_priv);
void intel_uc_fini_hw(struct drm_i915_private *dev_priv);
void intel_guc_notification_handler(struct intel_guc *guc);
+void intel_guc_process_default_action(struct intel_guc *guc, u32 msg);
int intel_guc_sample_forcewake(struct intel_guc *guc);
int intel_guc_send_nop(struct intel_guc *guc, const u32 *action, u32 len, u32 *response);
int intel_guc_send_mmio(struct intel_guc *guc, const u32 *action, u32 len, u32 *response);
With enabled CT, instead of programming SCRATCH 15 register with the Guc to host message, Guc will send us unsolicited CT message. Content of the first payload dword of this request has the same format as data expected in the above scratch register. Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com> Cc: Oscar Mateo <oscar.mateo@intel.com> --- drivers/gpu/drm/i915/intel_guc_ct.c | 3 +++ drivers/gpu/drm/i915/intel_uc.c | 7 +++++++ drivers/gpu/drm/i915/intel_uc.h | 1 + 3 files changed, 11 insertions(+)