drm/xe/guc: Use FAST_REQUEST for non-blocking H2G messages
authorDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Wed, 6 Dec 2023 21:14:41 +0000 (13:14 -0800)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 21 Dec 2023 21:31:30 +0000 (16:31 -0500)
commit0eb16fd26795639d5420b58bb12d11c7705e6dfa
tree4bc28c38c0ae53473720f011e74c0d106500518d
parentc5be725eb09de1f1083ba9b4762460ebc66b669c
drm/xe/guc: Use FAST_REQUEST for non-blocking H2G messages

We're currently sending non-blocking H2G messages using the EVENT type,
which suppresses all CTB protocol replies from the GuC, including the
failure cases. This might cause errors to slip through and manifest as
unexpected behavior (e.g. a context state might not be what the driver
thinks it is because the state change command was silently rejected by
the GuC). To avoid this kind of problems, we can use the FAST_REQUEST
type instead, which suppresses the reply only on success; this way we
still get the advantage of not having to wait for an ack from the GuC
(i.e. the H2G is still non-blocking) while still detecting errors.
Since we can't escalate to the caller when a non-blocking message
fails, we need to escalate to GT reset instead.

Note that FAST_REQUEST failures are NOT expected and are usually a sign
that the H2G was either malformed or requested an illegal operation.

v2: assign fence values to FAST_REQUEST messages, fix abi doc, use xe_gt
printers (Michal).

v3: fix doc alignment, fix and improve prints (Michal)

Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: John Harrison <John.C.Harrison@Intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com> #v2
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
drivers/gpu/drm/xe/abi/guc_messages_abi.h
drivers/gpu/drm/xe/xe_guc_ct.c