summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2021-07-06 12:52:53 +0200
committerGitHub <noreply@github.com>2021-07-06 12:52:53 +0200
commitef1a927848d828d432f0b475addee5bd82c990da (patch)
tree29f493a7541914a807f343b503455a3835bba520
parentaca8ecc39892dda22a1cc0ea6860cbc0774897f3 (diff)
parentf1232f5e38ce9dce21530f5b74eb4dd8780a0aa3 (diff)
downloadsystemd-ef1a927848d828d432f0b475addee5bd82c990da.tar.gz
Merge pull request #20092 from fbuihuu/tag-xgi-z7z9-graphic-chip-as-master-of-seat-take2
login: XGI Z7/Z9 (XG20 core) graphic chip requires master-of-seat to…
-rw-r--r--hwdb.d/60-seat.hwdb36
-rw-r--r--hwdb.d/meson.build1
-rwxr-xr-xhwdb.d/parse_hwdb.py2
-rw-r--r--src/login/71-seat.rules.in13
4 files changed, 44 insertions, 8 deletions
diff --git a/hwdb.d/60-seat.hwdb b/hwdb.d/60-seat.hwdb
new file mode 100644
index 0000000000..fcb8f53cd1
--- /dev/null
+++ b/hwdb.d/60-seat.hwdb
@@ -0,0 +1,36 @@
+# This file is part of systemd.
+#
+# This file lists graphic devices that don't have a DRM driver and fall back to
+# a frame-buffer one instead. Since commit 6260d28b8a, frame-buffer devices are
+# no more considered as graphical capable.
+#
+# The matches have the 'fb' prefix to make sure that only the framebuffer
+# device, and not the (parent) PCI device, is tagged with 'master-of-seat'.
+#
+# Allowed properties are:
+# ID_TAG_MASTER_OF_SEAT=1
+
+#########################################
+# eXtreme Graphic Innovation (XGI)
+#########################################
+
+# Z7/Z9 (XG20 core), a rather ancient graphic chip, doesn't have a DRM driver
+# and falls back to vesafb.
+fb:pci:v000018CAd00000020*
+ ID_TAG_MASTER_OF_SEAT=1
+
+#########################################
+# HyperV
+#########################################
+
+# HyperV currently doesn't do DRM, hence we need to synthesize for HyperV's fb
+# device instead.
+fb:pci:v00001414d00005353*
+ ID_TAG_MASTER_OF_SEAT=1
+
+#########################################
+# Parallels
+#########################################
+
+fb:pci:v00001ab8d00004005*
+ ID_TAG_MASTER_OF_SEAT=1
diff --git a/hwdb.d/meson.build b/hwdb.d/meson.build
index fd8c15a521..0a96b5553a 100644
--- a/hwdb.d/meson.build
+++ b/hwdb.d/meson.build
@@ -25,6 +25,7 @@ hwdb_files_test = files('''
60-evdev.hwdb
60-input-id.hwdb
60-keyboard.hwdb
+ 60-seat.hwdb
60-sensor.hwdb
70-joystick.hwdb
70-mouse.hwdb
diff --git a/hwdb.d/parse_hwdb.py b/hwdb.d/parse_hwdb.py
index 6d88766f0b..3cd4b486a6 100755
--- a/hwdb.d/parse_hwdb.py
+++ b/hwdb.d/parse_hwdb.py
@@ -67,6 +67,7 @@ UDEV_TAG = Word(string.ascii_uppercase, alphanums + '_')
# Those patterns are used in type-specific matches
TYPES = {'mouse': ('usb', 'bluetooth', 'ps2', '*'),
'evdev': ('name', 'atkbd', 'input'),
+ 'fb': ('pci'),
'id-input': ('modalias'),
'touchpad': ('i8042', 'rmi', 'bluetooth', 'usb'),
'joystick': ('i8042', 'rmi', 'bluetooth', 'usb'),
@@ -163,6 +164,7 @@ def property_grammar():
('IEEE1394_UNIT_FUNCTION_VIDEO', Or((Literal('0'), Literal('1')))),
('ID_VENDOR_FROM_DATABASE', name_literal),
('ID_MODEL_FROM_DATABASE', name_literal),
+ ('ID_TAG_MASTER_OF_SEAT', Literal('1')),
)
fixed_props = [Literal(name)('NAME') - Suppress('=') - val('VALUE')
for name, val in props]
diff --git a/src/login/71-seat.rules.in b/src/login/71-seat.rules.in
index 809467c6c8..25e4ee7e58 100644
--- a/src/login/71-seat.rules.in
+++ b/src/login/71-seat.rules.in
@@ -18,9 +18,6 @@ SUBSYSTEM=="graphics", KERNEL=="fb[0-9]*", TAG+="seat"
SUBSYSTEM=="leds", TAG+="seat"
SUBSYSTEM=="backlight", TAG+="seat"
-# HyperV currently doesn't do DRM, hence we need to synthesize for HyperV's fb device instead
-SUBSYSTEM=="graphics", KERNEL=="fb[0-9]", DRIVERS=="hyperv_fb", TAG+="master-of-seat"
-
# Allow efifb / uvesafb to be a master if KMS is disabled
SUBSYSTEM=="graphics", KERNEL=="fb[0-9]", IMPORT{cmdline}="nomodeset", TAG+="master-of-seat"
@@ -29,6 +26,11 @@ SUBSYSTEM=="graphics", KERNEL=="fb[0-9]", IMPORT{cmdline}="nomodeset", TAG+="mas
SUBSYSTEM=="pci", ENV{ID_PCI_CLASS_FROM_DATABASE}=="Display controller", \
ENV{DRIVER}=="", IMPORT{cmdline}="nomodeset", TAG+="seat", TAG+="master-of-seat"
+# Synthesize a seat for graphic devices without DRM and that fall back to fb
+# device instead. Such HWs are listed in hwdb.
+SUBSYSTEM=="graphics", KERNEL=="fb[0-9]*", ATTRS{modalias}=="?*", IMPORT{builtin}="hwdb fb:$attr{modalias}"
+ENV{ID_TAG_MASTER_OF_SEAT}=="1", TAG+="master-of-seat"
+
SUBSYSTEM=="drm", KERNEL=="card[0-9]*", TAG+="seat", TAG+="master-of-seat"
# Allow individual USB ports to be assigned to a seat
@@ -45,11 +47,6 @@ SUBSYSTEM=="usb", ATTR{idVendor}=="2230", ATTR{idProduct}=="000[13]", ENV{ID_AUT
# http://git.qemu.org/?p=qemu.git;a=blob;f=docs/multiseat.txt
SUBSYSTEM=="pci", ATTR{vendor}=="0x1b36", ATTR{device}=="0x000a", TAG+="seat", ENV{ID_AUTOSEAT}="1"
-# Video adapter of Parallels virtualization platform
-# Seat should be synthesized for it. But there's no in-kernel driver for this
-# device so matching by vid/pid.
-SUBSYSTEM=="pci", ATTRS{vendor}=="0x1ab8", ATTRS{device}=="0x4005", TAG+="seat", TAG+="master-of-seat"
-
# Mimo 720, with integrated USB hub, displaylink graphics, and e2i
# touchscreen. This device carries no proper VID/PID in the USB hub,
# but it does carry good ID data in the graphics component, hence we