[PATCH v1] drm/xe: Don't fail probe on unsupported mailbox command

Matthew Brost matthew.brost at intel.com
Mon Jul 14 18:51:16 UTC 2025


On Sun, Jul 13, 2025 at 07:37:01AM +0530, Raag Jadav wrote:
> If the device is running older pcode firmware, it is possible that
> newer mailbox commands are not supported by it. The sysfs attributes
> aren't useful in that case but we shouldn't fail probe because it.
> 
> Fixes: cdc36b66cd41 ("drm/xe: Expose fan control and voltage regulator version")
> Signed-off-by: Raag Jadav <raag.jadav at intel.com>

This allows the driver to load on my BMG with very old (and non-public)
IFIW firmware. Even if IFIW I'm using not available publically, I agree
we shouldn't fail the driver load on this type of error.

Tested-by: Matthew Brost <matthew.brost at intel.com>

> ---
>  drivers/gpu/drm/xe/xe_device_sysfs.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_device_sysfs.c b/drivers/gpu/drm/xe/xe_device_sysfs.c
> index 8250aa4620ee..654a1ba92311 100644
> --- a/drivers/gpu/drm/xe/xe_device_sysfs.c
> +++ b/drivers/gpu/drm/xe/xe_device_sysfs.c
> @@ -160,8 +160,13 @@ static int late_bind_create_files(struct device *dev)
>  
>  	ret = xe_pcode_read(root, PCODE_MBOX(PCODE_LATE_BINDING, GET_CAPABILITY_STATUS, 0),
>  			    &cap, NULL);
> -	if (ret)
> +	if (ret) {
> +		/* Don't fail probe on older pcode firmware which might not support this command. */
> +		if (ret == -ENXIO)
> +			ret = 0;
> +
>  		goto out;
> +	}
>  
>  	if (REG_FIELD_GET(V1_FAN_SUPPORTED, cap)) {
>  		ret = sysfs_create_file(&dev->kobj, &dev_attr_lb_fan_control_version.attr);
> -- 
> 2.34.1
> 


More information about the Intel-xe mailing list