From: Daniele Ceraolo Spurio Date: Mon, 13 Apr 2026 23:07:24 +0000 (-0700) Subject: drm/xe: Suppress reset log for killed queues X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad422cae958fcfbc231aabc8ad8fbcdda0f2e019;p=thirdparty%2Fkernel%2Flinux.git drm/xe: Suppress reset log for killed queues 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 Cc: Matthew Brost Reviewed-by: Matthew Brost Link: https://patch.msgid.link/20260413230724.714884-2-daniele.ceraolospurio@intel.com --- diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/xe_guc_submit.c index 10556156eaadb..b1222b42174c4 100644 --- a/drivers/gpu/drm/xe/xe_guc_submit.c +++ b/drivers/gpu/drm/xe/xe_guc_submit.c @@ -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); diff --git a/drivers/gpu/drm/xe/xe_pxp.c b/drivers/gpu/drm/xe/xe_pxp.c index 7244090b07825..968b7e70b3f97 100644 --- a/drivers/gpu/drm/xe/xe_pxp.c +++ b/drivers/gpu/drm/xe/xe_pxp.c @@ -13,10 +13,12 @@ #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); /*