Skip to content

Commit 6628851

Browse files
author
Andi Shyti
committed
drm/i915/gt: Continue creating engine sysfs files even after a failure
The i915 driver generates sysfs entries for each engine of the GPU in /sys/class/drm/cardX/engines/. The process is straightforward: we loop over the UABI engines and for each one, we: - Create the object. - Create basic files. - If the engine supports timeslicing, create timeslice duration files. - If the engine supports preemption, create preemption-related files. - Create default value files. Currently, if any of these steps fail, the process stops, and no further sysfs files are created. However, it's not necessary to stop the process on failure. Instead, we can continue creating the remaining sysfs files for the other engines. Even if some files fail to be created, the list of engines can still be retrieved by querying i915. Signed-off-by: Andi Shyti <[email protected]> Reviewed-by: Rodrigo Vivi <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 255fc17 commit 6628851

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/gpu/drm/i915/gt/sysfs_engines.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -530,9 +530,8 @@ void intel_engines_add_sysfs(struct drm_i915_private *i915)
530530
err_object:
531531
kobject_put(kobj);
532532
err_engine:
533-
dev_err(kdev, "Failed to add sysfs engine '%s'\n",
534-
engine->name);
535-
break;
533+
dev_warn(kdev, "Failed to add sysfs engine '%s'\n",
534+
engine->name);
536535
}
537536
}
538537
}

0 commit comments

Comments
 (0)