]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/xe/vf: Disallow setting wedged mode to upon-any-hang
authorLukasz Laguna <lukasz.laguna@intel.com>
Wed, 7 Jan 2026 17:47:40 +0000 (18:47 +0100)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 8 Jan 2026 21:07:53 +0000 (16:07 -0500)
In upon-any-hang (2) wedged mode, 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>
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
Link: https://patch.msgid.link/20260107174741.29163-4-lukasz.laguna@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
drivers/gpu/drm/xe/xe_device.c

index 62ec2e2d64368b22a88380a86861ef2989290666..d3431128670ea0116337c6f129dc0c797cfc9b49 100644 (file)
@@ -1387,6 +1387,11 @@ 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)) {
+               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)));
+               return -EPERM;
        }
 
        return 0;