Skip to content

udev-dev: enumerate DRM primary nodes via hw.dri sysctl in jails#18

Open
Defenso-QTH wants to merge 1 commit into
wulf7:masterfrom
Defenso-QTH:sysctl-drm
Open

udev-dev: enumerate DRM primary nodes via hw.dri sysctl in jails#18
Defenso-QTH wants to merge 1 commit into
wulf7:masterfrom
Defenso-QTH:sysctl-drm

Conversation

@Defenso-QTH

Copy link
Copy Markdown
Contributor

In a FreeBSD jail devfs may not expose /dev/dri/card* even though the hw.dri.* sysctl subtree is readable. Add a sysctl-based enumeration like the one for input devices.

hw.dri only has entries for primary nodes (no render nodes), and the index N maps directly to the /dev/dri/cardN path that drm-kmod creates, so no type filtering or path translation is needed.

Refactor the common OID tree-walk into enumerate_sysctl_units() to avoid duplication with udev_dev_enumerate_evdev_sysctl.

Sponsored by: Defenso

In a FreeBSD jail devfs may not expose /dev/dri/card* even though the
hw.dri.* sysctl subtree is readable. Add a sysctl-based enumeration like the
one for input devices.

hw.dri only has entries for primary nodes (no render nodes), and the
index N maps directly to the /dev/dri/cardN path that drm-kmod creates,
so no type filtering or path translation is needed.

Refactor the common OID tree-walk into enumerate_sysctl_units() to
avoid duplication with udev_dev_enumerate_evdev_sysctl.

Sponsored by: Defenso

Signed-off-by: Quentin Thébault <quentin.thebault@defenso.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant