[PATCH v5 4/4] drm/xe/pf: Allow wedged_mode=2 only in debug config

Michal Wajdeczko michal.wajdeczko at intel.com
Wed May 14 20:39:17 UTC 2025



On 14.05.2025 12:11, Lukasz Laguna wrote:
> The GuC reset policy is global, so changing it on PF can impact running

it's not only about the change itself, but more that in UPON_ANY_HANG
mode the GuC reset policy would impact all VFs, even those that didn't
cause a hang

> VFs. To avoid unintended side effects, setting wedged_mode=2 on the PF
                                                            ^^
please use full mode name, not just number

> is restricted to debug builds only.
> 
> Signed-off-by: Lukasz Laguna <lukasz.laguna at intel.com>

otherwise LGTM

> ---
>  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 7dfc39dd4c9c..f23d8236bddc 100644
> --- a/drivers/gpu/drm/xe/xe_device.c
> +++ b/drivers/gpu/drm/xe/xe_device.c
> @@ -1189,7 +1189,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)))) {
>  		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;



More information about the Intel-xe mailing list