Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Dong, Zhanjun" <zhanjun.dong@intel.com>
To: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>,
	<intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH v4 2/2] drm/xe/guc: Preserve HW error state in wedged mode 2
Date: Tue, 30 Jun 2026 15:27:58 -0400	[thread overview]
Message-ID: <c0b83019-18b3-4049-87db-6fb8d30cc6c1@intel.com> (raw)
In-Reply-To: <250d289a-3fd7-465e-9e81-e91601a5bc03@intel.com>



On 2026-06-29 7:31 p.m., Daniele Ceraolo Spurio wrote:
> 
> 
> On 6/29/2026 7:08 AM, Zhanjun Dong wrote:
>> When HW reports an uncorrectable error, debugging the root cause may
>> require halting the GPU in the error state so scan dumps can be collected
>> and inspected.
>>
>> Use wedged_mode=2 for this debug mode. In this mode, Xe already avoids 
>> GPU
>> reset on hangs, so also skip the engine reset cleanup path for GuC
>> uncorrectable error reports to keep the HW state intact.
>>
>> Signed-off-by: Zhanjun Dong <zhanjun.dong@intel.com>
>> ---
>>   drivers/gpu/drm/xe/xe_guc_submit.c | 6 ++++--
>>   1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_guc_submit.c b/drivers/gpu/drm/xe/ 
>> xe_guc_submit.c
>> index 29ccabc4b7a4..05fa4e466461 100644
>> --- a/drivers/gpu/drm/xe/xe_guc_submit.c
>> +++ b/drivers/gpu/drm/xe/xe_guc_submit.c
>> @@ -3024,8 +3024,10 @@ int xe_guc_uncorrectable_error_handler(struct 
>> xe_guc *guc, u32 *msg, u32 len)
>>       trace_xe_guc_uncorrectable_error(q);
>> -    /* Treat the same as engine reset */
>> -    xe_guc_exec_queue_reset_trigger_cleanup(q);
>> +    if (guc_to_xe(guc)->wedged.mode != 
>> XE_WEDGED_MODE_UPON_ANY_HANG_NO_RESET) {
>> +        /* Treat the same as engine reset */
>> +        xe_guc_exec_queue_reset_trigger_cleanup(q);
>> +    }
> 
> This doesn't seem the correct place to do this. On one side, if we skip 
> the reset call here, if the queue it's actually hung on the engine then 
> the fence will eventually timeout and guc_exec_queue_timedout_job() will 
> be called anyway. On the other side, 
> XE_WEDGED_MODE_UPON_ANY_HANG_NO_RESET is a generic flag and 
> xe_guc_exec_queue_reset_trigger_cleanup is also called from the CAT 
> error path, so we should cover that as well. The best way to solve both 
> issues IMO is to add a check in guc_exec_queue_timedout_job to wedge if 
> XE_WEDGED_MODE_UPON_ANY_HANG_NO_RESET is set.

Good point, test shown the existing mode=2 feature already handles this, 
so this patch is out of scope and would be removed in next rev.

Regards,
Zhanjun Dong>
> Daniele
> 
>>       return 0;
>>   }
> 


  reply	other threads:[~2026-06-30 19:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-29 14:08 [PATCH v4 0/2] drm/xe/guc: Handle GuC local uncorrectable error notifications Zhanjun Dong
2026-06-29 14:08 ` [PATCH v4 1/2] " Zhanjun Dong
2026-06-29 14:08 ` [PATCH v4 2/2] drm/xe/guc: Preserve HW error state in wedged mode 2 Zhanjun Dong
2026-06-29 23:31   ` Daniele Ceraolo Spurio
2026-06-30 19:27     ` Dong, Zhanjun [this message]
2026-06-30  0:52 ` ✓ CI.KUnit: success for drm/xe/guc: Handle GuC local uncorrectable error notifications Patchwork
2026-06-30  1:36 ` ✓ Xe.CI.BAT: " Patchwork
2026-06-30 13:58 ` ✓ Xe.CI.FULL: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c0b83019-18b3-4049-87db-6fb8d30cc6c1@intel.com \
    --to=zhanjun.dong@intel.com \
    --cc=daniele.ceraolospurio@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox