[PATCH v6 4/4] drm/xe/pf: Allow upon-any-hang wedged mode only in debug config
Michal Wajdeczko
michal.wajdeczko at intel.com
Wed May 28 09:21:44 UTC 2025
On 21.05.2025 14:25, Lukasz Laguna wrote:
> 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 at intel.com>
Reviewed-by: Michal Wajdeczko <michal.wajdeczko at 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 c495d499edff..35ae9eba7526 100644
> --- a/drivers/gpu/drm/xe/xe_device.c
> +++ b/drivers/gpu/drm/xe/xe_device.c
> @@ -1186,7 +1186,8 @@ int xe_device_validate_wedged_mode(struct xe_device *xe, unsigned int mode)
> if (mode > XE_WEDGED_MODE_UPON_ANY_HANG) {
> drm_dbg(&xe->drm, "wedged_mode: invalid value (%u)\n", mode);
> return -EINVAL;
> - } else if (mode == XE_WEDGED_MODE_UPON_ANY_HANG && IS_SRIOV_VF(xe)) {
> + } else if (mode == XE_WEDGED_MODE_UPON_ANY_HANG && (IS_SRIOV_VF(xe) ||
> + (IS_SRIOV_PF(xe) && !IS_ENABLED(CONFIG_DRM_XE_DEBUG)))) {
nit: this condition alignment looks weird - checkpatch didn't complain?
> drm_dbg(&xe->drm, "wedged_mode: (%u) %s mode is not supported for %s\n",
> mode, xe_device_wedged_mode_to_string(mode),
> xe_sriov_mode_to_string(xe_device_sriov_mode(xe)));
More information about the Intel-xe
mailing list