From: Marc-Andre Lureau Date: Tue, 14 Feb 2017 09:18:27 +0000 (+0400) Subject: rules: add persistent by-path drm rules (#5337) X-Git-Tag: v233~100 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=36971ed37bb638e9228c1fb99d6f0e8dceee7855;p=thirdparty%2Fsystemd.git 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 --- diff --git a/rules/60-drm.rules b/rules/60-drm.rules index 1ed3e445f2d..f7f3435d508 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"