]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/xe: Suppress reset log for killed queues
authorDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Mon, 13 Apr 2026 23:07:24 +0000 (16:07 -0700)
committerDaniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Wed, 15 Apr 2026 21:34:09 +0000 (14:34 -0700)
When an app exits abruptly (for example due to the user hitting ctrl+c),
any of its queues that are still active on the HW are immediately
killed. As part of this process, the driver tells the GuC to preempt
the queues off the HW and to reset them if they don't preempt.
This can cause a reset log to be printed to dmesg, which can be confusing
to users as resets are commonly tied to errors, while any resets performed
in this case are just done to speed up the cleanup. Also, those reset
messages are not useful for debug, because we don't care what happens to
a queue once its app has exited.

The only case where a queue might be killed before the app that owns it
has exited is if the queue uses PXP and a PXP termination occurs. In
such scenario a log might be useful, but rather than a reset log it is
better to have a communication that the queue is being killed.

Therefore, we can silence the reset log for all killed queues and add a
simple debug log to record when a PXP queue is killed to cover that case.

Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Matthew Brost <matthew.brost@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Link: https://patch.msgid.link/20260413230724.714884-2-daniele.ceraolospurio@intel.com
drivers/gpu/drm/xe/xe_guc_submit.c
drivers/gpu/drm/xe/xe_pxp.c

index 10556156eaadb3d204668730c9790c3fdf884d25..b1222b42174c40ca3bd28f32c1c557164a486098 100644 (file)
@@ -2968,9 +2968,10 @@ int xe_guc_exec_queue_reset_handler(struct xe_guc *guc, u32 *msg, u32 len)
        if (unlikely(!q))
                return -EPROTO;
 
-       xe_gt_info(gt, "Engine reset: engine_class=%s, logical_mask: 0x%x, guc_id=%d, state=0x%0x",
-                  xe_hw_engine_class_to_str(q->class), q->logical_mask, guc_id,
-                  atomic_read(&q->guc->state));
+       if (!exec_queue_killed(q))
+               xe_gt_info(gt, "Engine reset: engine_class=%s, logical_mask: 0x%x, guc_id=%d, state=0x%0x",
+                          xe_hw_engine_class_to_str(q->class), q->logical_mask, guc_id,
+                          atomic_read(&q->guc->state));
 
        trace_xe_exec_queue_reset(q);
 
index 7244090b0782553ec57fc5d62420e4c16048b935..968b7e70b3f9729070572174770278d01c8d397c 100644 (file)
 #include "xe_device_types.h"
 #include "xe_exec_queue.h"
 #include "xe_force_wake.h"
+#include "xe_guc_exec_queue_types.h"
 #include "xe_guc_submit.h"
 #include "xe_gsc_proxy.h"
 #include "xe_gt_types.h"
 #include "xe_huc.h"
+#include "xe_hw_engine.h"
 #include "xe_mmio.h"
 #include "xe_pm.h"
 #include "xe_pxp_submit.h"
@@ -740,6 +742,10 @@ static void pxp_invalidate_queues(struct xe_pxp *pxp)
        spin_unlock_irq(&pxp->queues.lock);
 
        list_for_each_entry_safe(q, tmp, &to_clean, pxp.link) {
+               drm_dbg(&pxp->xe->drm,
+                       "Killing queue due to PXP termination: eclass=%s, guc_id=%d\n",
+                       xe_hw_engine_class_to_str(q->class), q->guc->id);
+
                xe_exec_queue_kill(q);
 
                /*