summaryrefslogtreecommitdiff
path: root/rules
diff options
context:
space:
mode:
authorMarc-Andre Lureau <marcandre.lureau@gmail.com>2017-02-14 13:18:27 +0400
committerLennart Poettering <lennart@poettering.net>2017-02-14 10:18:27 +0100
commit36971ed37bb638e9228c1fb99d6f0e8dceee7855 (patch)
tree86f8d9aa5495fc66018462a03e37c4ab4d1dde87 /rules
parentf34182f00e5517c22cba81a8886481e804f4cc78 (diff)
downloadsystemd-36971ed37bb638e9228c1fb99d6f0e8dceee7855.tar.gz
rules: add persistent by-path drm rules (#5337)
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>
Diffstat (limited to 'rules')
-rw-r--r--rules/60-drm.rules5
1 files changed, 5 insertions, 0 deletions
diff --git a/rules/60-drm.rules b/rules/60-drm.rules
index 1ed3e445f2..f7f3435d50 100644
--- a/rules/60-drm.rules
+++ b/rules/60-drm.rules
@@ -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"