drm/i915/guc: Unwind context requests in reverse order
authorMatthew Brost <matthew.brost@intel.com>
Thu, 9 Sep 2021 16:47:24 +0000 (09:47 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Nov 2021 08:49:04 +0000 (09:49 +0100)
commitf5b5ea1654408018e0515fcb62b35fe22ef81ca3
treee2f9bebc668d9ba95ba8abac00922cd4f38079fe
parent413e603c1447d117261ed33c6571688964636c0b
drm/i915/guc: Unwind context requests in reverse order

commit c39f51cc980dd918c5b3da61d54c4725785e766e upstream.

When unwinding requests on a reset context, if other requests in the
context are in the priority list the requests could be resubmitted out
of seqno order. Traverse the list of active requests in reverse and
append to the head of the priority list to fix this.

Fixes: eb5e7da736f3 ("drm/i915/guc: Reset implementation for new GuC interface")
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210909164744.31249-4-matthew.brost@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c