]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/xe/pxp: Clean up termination status on failure
authorDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Tue, 24 Mar 2026 15:37:20 +0000 (08:37 -0700)
committerDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Fri, 27 Mar 2026 13:53:05 +0000 (06:53 -0700)
If the PXP HW termination fails during PXP start, the normal completion
code won't be called, so the termination will remain uncomplete. To avoid
unnecessary waits, mark the termination as completed from the error path.
Note that we already do this if the termination fails when handling a
termination irq from the HW.

Fixes: f8caa80154c4 ("drm/xe/pxp: Add PXP queue tracking and session start")
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Alan Previn Teres Alexis <alan.previn.teres.alexis@intel.com>
Cc: Julia Filipchuk <julia.filipchuk@intel.com>
Reviewed-by: Julia Filipchuk <julia.filipchuk@intel.com>
Link: https://patch.msgid.link/20260324153718.3155504-7-daniele.ceraolospurio@intel.com
drivers/gpu/drm/xe/xe_pxp.c

index e2978e48f66077f993c762874e5ff74378e9d7f0..b60ea85c3e11c467a3a724d84e8de6ea8dbcd6da 100644 (file)
@@ -583,6 +583,7 @@ wait_for_idle:
                        drm_err(&pxp->xe->drm, "PXP termination failed before start\n");
                        mutex_lock(&pxp->mutex);
                        pxp->status = XE_PXP_ERROR;
+                       complete_all(&pxp->termination);
 
                        goto out_unlock;
                }