]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
rules: add persistent by-path drm rules (#5337)
authorMarc-Andre Lureau <marcandre.lureau@gmail.com>
Tue, 14 Feb 2017 09:18:27 +0000 (13:18 +0400)
committerLennart Poettering <lennart@poettering.net>
Tue, 14 Feb 2017 09:18:27 +0000 (10:18 +0100)
Create persistent symlinks for DRM devices, ex:
/dev/dri/by-path/pci-0000:00:02.0-card -> /dev/dri/card1
/dev/dri/by-path/pci-0000:00:02.0-render -> /dev/dri/renderD129
etc...

This allows to configure DRM device usage with stable paths.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
rules/60-drm.rules

index 1ed3e445f2dea76074d58d28fbc0d246f228f356..f7f3435d508afa5477d946217576c96a60a54920 100644 (file)
@@ -1,3 +1,8 @@
 # do not edit this file, it will be overwritten on update
 
 ACTION!="remove", SUBSYSTEM=="drm", SUBSYSTEMS=="pci|usb|platform", IMPORT{builtin}="path_id"
+
+# by-path
+ENV{ID_PATH}=="?*", KERNEL=="card*", SYMLINK+="dri/by-path/$env{ID_PATH}-card"
+ENV{ID_PATH}=="?*", KERNEL=="controlD*", SYMLINK+="dri/by-path/$env{ID_PATH}-control"
+ENV{ID_PATH}=="?*", KERNEL=="renderD*", SYMLINK+="dri/by-path/$env{ID_PATH}-render"