]> www.infradead.org Git - users/dwmw2/linux.git/commit
drm/i915/guc: Workaround reset G2H is received after schedule done G2H
authorMatthew Brost <matthew.brost@intel.com>
Thu, 9 Sep 2021 16:47:27 +0000 (09:47 -0700)
committerJohn Harrison <John.C.Harrison@Intel.com>
Mon, 13 Sep 2021 18:30:30 +0000 (11:30 -0700)
commit1ca36cff0166b0483fe3b99e711e9c800ebbfaa4
tree2015506879b07228a3431492da6c85730c8e0483
parentd67e3d5a5da8ddcad7fcfac6a2a521128e4304af
drm/i915/guc: Workaround reset G2H is received after schedule done G2H

If the context is reset as a result of the request cancellation the
context reset G2H is received after schedule disable done G2H which is
the wrong order. The schedule disable done G2H release the waiting
request cancellation code which resubmits the context. This races
with the context reset G2H which also wants to resubmit the context but
in this case it really should be a NOP as request cancellation code owns
the resubmit. Use some clever tricks of checking the context state to
seal this race until the GuC firmware is fixed.

v2:
 (Checkpatch)
  - Fix typos
v3:
 (Daniele)
  - State that is a bug in the GuC firmware

Fixes: 62eaf0ae217d ("drm/i915/guc: Support request cancellation")
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Cc: <stable@vger.kernel.org>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210909164744.31249-7-matthew.brost@intel.com
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c