Skip to content

Report display and input nodes, answer DMDRVI_IOCTL_DEVFS_GET_FRIEND - #67

Merged
JohnAmadis merged 2 commits into
mainfrom
feature/display-input-reporting
Oct 3, 2026
Merged

JohnAmadis merged 2 commits into
mainfrom
feature/display-input-reporting

Conversation

@JohnAmadis

Copy link
Copy Markdown
Contributor

Besides "monitor" and "block", dmdevfs now probes every node with the standard dmdrvi graphics and input ioctls and reports it to libsystemd as

  • "display": the driver answers DMDRVI_IOCTL_GFX_GET_INFO - e.g. for a dmview@ service per display;
  • "input": the driver answers DMDRVI_IOCTL_INPUT_GET_INFO - touch panels, mice, buttons.

Every display or input driver implementing the standard ioctls gets its services started by device rules without reporting anything itself. report= accepts "display" and "input" too. The class names move to the public dmdevfs.h (DMDEVFS_CLASS_*).

DMDRVI_IOCTL_DEVFS_GET_FRIEND (dmdrvi 2.4) on an open node is answered by dmdevfs itself, never by the driver: the index-th other member of the node's friends_group (absolute path, friend_role). This is what drivers get through dmdrvi_friend_changed(), for every module - e.g. a display service finding the touch panel of its display, without depending on the dmdevfs module.

Tests: the test driver answers the new ioctls when configured with display=true / input=true; new steps check that display and input nodes start dsp@/inp@ units only under their own class, that report= limits them, that unmounting stops them, and the friends lookup.

Requires dmdrvi 2.4.

JohnAmadis and others added 2 commits October 3, 2026 16:58
Besides "monitor" and "block", dmdevfs now probes every node with the
standard dmdrvi graphics and input ioctls and reports it to libsystemd as

- "display": the driver answers DMDRVI_IOCTL_GFX_GET_INFO - e.g. for a
  dmview@<name> service per display;
- "input": the driver answers DMDRVI_IOCTL_INPUT_GET_INFO - touch panels,
  mice, buttons.

Every display or input driver implementing the standard ioctls gets its
services started by device rules without reporting anything itself.
report= accepts "display" and "input" too. The class names move to the
public dmdevfs.h (DMDEVFS_CLASS_*).

DMDRVI_IOCTL_DEVFS_GET_FRIEND (dmdrvi 2.4) on an open node is answered by
dmdevfs itself, never by the driver: the index-th other member of the
node's friends_group (absolute path, friend_role). This is what drivers
get through dmdrvi_friend_changed(), for every module - e.g. a display
service finding the touch panel of its display, without depending on the
dmdevfs module.

Tests: the test driver answers the new ioctls when configured with
display=true / input=true; new steps check that display and input nodes
start dsp@/inp@ units only under their own class, that report= limits
them, that unmounting stops them, and the friends lookup.

Requires dmdrvi 2.4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The answer is written straight into the buffers the caller passes in
dmdrvi_devfs_friend_t - no path_t or other fixed-size buffer of dmdevfs
in between. The lengths are always filled in; NULL or too small buffers
give -ERANGE, so callers can ask for the lengths first. Nothing is logged
under g_devfs_mutex.

Tests cover asking for the lengths only, an exactly fitting buffer and a
buffer one byte short.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JohnAmadis
JohnAmadis merged commit 0470903 into main Oct 3, 2026
1 of 2 checks passed
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