drm/i915/selftests: Add a cancel request selftest that triggers a reset
authorMatthew Brost <matthew.brost@intel.com>
Thu, 13 Jan 2022 18:13:50 +0000 (10:13 -0800)
committerJohn Harrison <John.C.Harrison@Intel.com>
Wed, 19 Jan 2022 00:56:17 +0000 (16:56 -0800)
commit4e68354667716e62089ce3032a3c7e1b6c07e669
tree5e0eb92d6b4558de322a0f012956988b80b68234
parentb5cfe6f7a6e17c6bc7c802d382cf22c4dc405477
drm/i915/selftests: Add a cancel request selftest that triggers a reset

Add a cancel request selftest that results in an engine reset to cancel
the request as it is non-preemptable. Also insert a NOP request after
the cancelled request and confirm that it completes successfully.

v2:
 (Tvrtko)
  - Skip test if preemption timeout compiled out
  - Skip test if engine reset isn't supported
  - Update debug prints to be more descriptive
v3:
  - Add comment explaining test
v4:
 (John Harrison)
  - Fix typos in comment explaining test
  - goto out_rq is NOP creation fails

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/20220113181351.21296-2-matthew.brost@intel.com
drivers/gpu/drm/i915/selftests/i915_request.c