]> git.baikalelectronics.ru Git - kernel.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)
commit2dbbd2b093df993aa5c56f6263b524fc241f50d2
tree2015506879b07228a3431492da6c85730c8e0483
parent1dc6ccc3109c467ed93ef7857656bb188bca25fd
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: d8d2ee02d17f ("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