drm/xe/pf: Allow upon-any-hang wedged mode only in debug config

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>
Link: https://patch.msgid.link/20260107174741.29163-5-lukasz.laguna@intel.com
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
This commit is contained in:
Lukasz Laguna 2026-01-07 18:47:41 +01:00 committed by Rodrigo Vivi
parent 43d78aca8e
commit 96d45e34f8
No known key found for this signature in database
GPG Key ID: FA625F640EEB13CA

View File

@ -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)));