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,
	matthew.brost@intel.com, lukasz.laguna@intel.com
Subject: [PATCH v2 3/4] drm/xe/vf: Disallow setting wedged_mode=2
Date: Mon, 12 May 2025 18:34:31 +0200	[thread overview]
Message-ID: <20250512163432.22678-4-lukasz.laguna@intel.com> (raw)
In-Reply-To: <20250512163432.22678-1-lukasz.laguna@intel.com>

In wedged_mode=2, engine resets need to be disabled, which requires
changing the GuC reset policy. VFs are not permitted to do that.

Signed-off-by: Lukasz Laguna <lukasz.laguna@intel.com>
---
 drivers/gpu/drm/xe/xe_device.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
index b2d4f1b7d46a..c4ddc34ab270 100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -1189,6 +1189,10 @@ int xe_device_wedged_mode_validate(struct xe_device *xe, unsigned int mode)
 	if (mode > XE_WEDGED_MODE_FIRST_HANG) {
 		drm_dbg(&xe->drm, "wedged_mode: invalid value (%u)\n", mode);
 		return -EINVAL;
+	} else if (mode == XE_WEDGED_MODE_FIRST_HANG && IS_SRIOV_VF(xe)) {
+		drm_dbg(&xe->drm, "wedged_mode: unsupported mode (%u) for %s\n", mode,
+			xe_sriov_mode_to_string(xe_device_sriov_mode(xe)));
+		return -EPERM;
 	}
 
 	return 0;
-- 
2.40.0


  parent reply	other threads:[~2025-05-12 16:35 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-12 16:34 [PATCH v2 0/4] drm/xe: Improve wedged mode handling Lukasz Laguna
2025-05-12 16:34 ` [PATCH v2 1/4] drm/xe: Validate wedged_mode parameter and define enum for modes Lukasz Laguna
2025-05-12 17:05   ` Michal Wajdeczko
2025-05-12 16:34 ` [PATCH v2 2/4] drm/xe: Don't update wedged mode in case of an error Lukasz Laguna
2025-05-12 16:34 ` Lukasz Laguna [this message]
2025-05-12 16:34 ` [PATCH v2 4/4] drm/xe/pf: Allow wedged_mode=2 only in debug config Lukasz Laguna
2025-05-12 17:17 ` ✓ CI.Patch_applied: success for drm/xe: Improve wedged mode handling (rev2) Patchwork
2025-05-12 17:17 ` ✓ CI.checkpatch: " Patchwork
2025-05-12 17:18 ` ✓ CI.KUnit: " Patchwork
2025-05-12 17:28 ` ✗ CI.Build: failure " Patchwork
2025-05-13 12:11 ` ✓ CI.Patch_applied: success " Patchwork
2025-05-13 12:12 ` ✓ CI.checkpatch: " Patchwork
2025-05-13 12:14 ` ✓ CI.KUnit: " Patchwork
2025-05-13 12:28 ` ✓ CI.Build: " Patchwork
2025-05-13 12:31 ` ✗ CI.Hooks: failure " Patchwork
2025-05-13 12:32 ` ✓ CI.checksparse: success " Patchwork
2025-05-13 12:58 ` ✓ Xe.CI.BAT: " Patchwork
2025-05-13 15:10 ` ✗ 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=20250512163432.22678-4-lukasz.laguna@intel.com \
    --to=lukasz.laguna@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=matthew.brost@intel.com \
    --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