drm/i915/guc: Add stall timer to non blocking CTB send function
authorMatthew Brost <matthew.brost@intel.com>
Thu, 8 Jul 2021 16:20:53 +0000 (09:20 -0700)
committerJohn Harrison <John.C.Harrison@Intel.com>
Tue, 13 Jul 2021 20:50:03 +0000 (13:50 -0700)
commitb43b9950486eb9b229493fc91cdabbbb4d07cfbc
treef9b90d0e448fd4698247be4826955a923d498309
parent1681924d8bdeb248451fd1d47c18648ffaeed625
drm/i915/guc: Add stall timer to non blocking CTB send function

Implement a stall timer which fails H2G CTBs once a period of time
with no forward progress is reached to prevent deadlock.

v2:
 (Michal)
  - Improve error message in ct_deadlock()
  - Set broken when ct_deadlock() returns true
  - Return -EPIPE on ct_deadlock()
v3:
 (Michal)
  - Add ms to stall timer comment
 (Matthew)
  - Move broken check to intel_guc_ct_send()

Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: John Harrison <John.C.Harrison@Intel.com>
Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210708162055.129996-6-matthew.brost@intel.com
drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
drivers/gpu/drm/i915/gt/uc/intel_guc_ct.h