Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Lukasz Laguna <lukasz.laguna@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: michal.wajdeczko@intel.com, rodrigo.vivi@intel.com,
	lukasz.laguna@intel.com
Subject: [PATCH v12 4/4] drm/xe/pf: Allow upon-any-hang wedged mode only in debug config
Date: Wed,  7 Jan 2026 18:47:41 +0100	[thread overview]
Message-ID: <20260107174741.29163-5-lukasz.laguna@intel.com> (raw)
In-Reply-To: <20260107174741.29163-1-lukasz.laguna@intel.com>

The GuC reset policy is global, so disabling it on PF can affect all
running VFs. To avoid unintended side effects, restrict setting
upon-any-hang (2) wedged mode on the PF to debug builds only.

Signed-off-by: Lukasz Laguna <lukasz.laguna@intel.com>
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
---
 drivers/gpu/drm/xe/xe_device.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
index d3431128670e..e400ad5c9f9e 100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -1387,7 +1387,8 @@ int xe_device_validate_wedged_mode(struct xe_device *xe, unsigned int mode)
 	if (mode > XE_WEDGED_MODE_UPON_ANY_HANG_NO_RESET) {
 		drm_dbg(&xe->drm, "wedged_mode: invalid value (%u)\n", mode);
 		return -EINVAL;
-	} else if (mode == XE_WEDGED_MODE_UPON_ANY_HANG_NO_RESET && IS_SRIOV_VF(xe)) {
+	} else if (mode == XE_WEDGED_MODE_UPON_ANY_HANG_NO_RESET && (IS_SRIOV_VF(xe) ||
+		   (IS_SRIOV_PF(xe) && !IS_ENABLED(CONFIG_DRM_XE_DEBUG)))) {
 		drm_dbg(&xe->drm, "wedged_mode: (%u) %s mode is not supported for %s\n",
 			mode, xe_wedged_mode_to_string(mode),
 			xe_sriov_mode_to_string(xe_device_sriov_mode(xe)));
-- 
2.40.0


  parent reply	other threads:[~2026-01-07 17:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-07 17:47 [PATCH v12 0/4] drm/xe: Improve wedged mode handling Lukasz Laguna
2026-01-07 17:47 ` [PATCH v12 1/4] drm/xe: Validate wedged_mode parameter and define enum for modes Lukasz Laguna
2026-01-07 17:47 ` [PATCH v12 2/4] drm/xe: Update wedged.mode only after successful reset policy change Lukasz Laguna
2026-01-08 21:06   ` Rodrigo Vivi
2026-01-18 14:39   ` Thomas Hellström
2026-01-20  8:27     ` Laguna, Lukasz
2026-01-07 17:47 ` [PATCH v12 3/4] drm/xe/vf: Disallow setting wedged mode to upon-any-hang Lukasz Laguna
2026-01-07 17:47 ` Lukasz Laguna [this message]
2026-01-07 17:55 ` ✓ CI.KUnit: success for drm/xe: Improve wedged mode handling (rev12) Patchwork
2026-01-07 18:33 ` ✓ Xe.CI.BAT: " Patchwork
2026-01-07 19:54 ` ✗ Xe.CI.Full: failure " 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=20260107174741.29163-5-lukasz.laguna@intel.com \
    --to=lukasz.laguna@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=michal.wajdeczko@intel.com \
    --cc=rodrigo.vivi@intel.com \
    /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