Skip to content

Commit d9e9aa3

Browse files
raagjadavrodrigovivi
authored andcommitted
drm/xe: Don't fail probe on unsupported mailbox command
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 driver probe because of it. As of now, it is unknown if we can distinguish unsupported commands before attempting them. But until we figure out a way to do that, fix the regressions. v2: Add debug message (Lucas) Fixes: cdc36b6 ("drm/xe: Expose fan control and voltage regulator version") Signed-off-by: Raag Jadav <[email protected]> Tested-by: Matthew Brost <[email protected]> Reviewed-by: Jonathan Cavitt <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rodrigo Vivi <[email protected]> (cherry picked from commit ed5461daa150b037e36b8202381da1ef85d6b16b) Signed-off-by: Rodrigo Vivi <[email protected]>
1 parent ba0f4c4 commit d9e9aa3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

drivers/gpu/drm/xe/xe_device_sysfs.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,13 @@ static int late_bind_create_files(struct device *dev)
160160

161161
ret = xe_pcode_read(root, PCODE_MBOX(PCODE_LATE_BINDING, GET_CAPABILITY_STATUS, 0),
162162
&cap, NULL);
163-
if (ret)
163+
if (ret) {
164+
if (ret == -ENXIO) {
165+
drm_dbg(&xe->drm, "Late binding not supported by firmware\n");
166+
ret = 0;
167+
}
164168
goto out;
169+
}
165170

166171
if (REG_FIELD_GET(V1_FAN_SUPPORTED, cap)) {
167172
ret = sysfs_create_file(&dev->kobj, &dev_attr_lb_fan_control_version.attr);

0 commit comments

Comments
 (0)