Commit f07d9a61 authored by Daniele Ceraolo Spurio's avatar Daniele Ceraolo Spurio Committed by Rodrigo Vivi

drm/xe/slpc: Start SLPC before GuC submission on reset

The SLPC code has a strict 5ms timeout from when the start command is
queued to when we expect the reply to appear in memory. This works if
the CT channel is empty, but if the channel is busy there might be an
extra delay that causes the process to exceeded the timeout. We see
this issue when a reset occurs while userspace keeps submitting,
because the submission code is re-enabled first and it will start using
the channel to service those submissions.
To fix this, we can simply start SLPC before re-enabling submission.
This has also the benefit of not allowing submissions to go through with
an uninitialized SLPC.

Link: https://gitlab.freedesktop.org/drm/xe/kernel/-/issues/375Signed-off-by: default avatarDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Vinay Belgaumkar <vinay.belgaumkar@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: default avatarVinay Belgaumkar <vinay.belgaumkar@intel.com>
Reviewed-by: default avatarMatthew Brost <matthew.brost@intel.com>
Link: https://lore.kernel.org/r/20230628001642.3170070-1-daniele.ceraolospurio@intel.comSigned-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
parent 420c6a6f
...@@ -802,14 +802,10 @@ int xe_guc_start(struct xe_guc *guc) ...@@ -802,14 +802,10 @@ int xe_guc_start(struct xe_guc *guc)
{ {
int ret; int ret;
ret = xe_guc_submit_start(guc);
if (ret)
return ret;
ret = xe_guc_pc_start(&guc->pc); ret = xe_guc_pc_start(&guc->pc);
XE_WARN_ON(ret); XE_WARN_ON(ret);
return 0; return xe_guc_submit_start(guc);
} }
void xe_guc_print_info(struct xe_guc *guc, struct drm_printer *p) void xe_guc_print_info(struct xe_guc *guc, struct drm_printer *p)
......
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