Skip to content

drm-shim: hide all other render-nodes and card devices

Jordan Justen requested to merge jljusten/mesa:drm-shim-one-render-node into main

intel_device_info_override_test has an issue if multiple intel devices are in the system. It loops over all drm devices, creates an intel devinfo struct, and then verifies that devinfo->verx10 matches an expected value. But, drm-shim only "fakes" one device. So /dev/dri/renderD129 will also be tested, and in most cases devinfo->verx10 will not match what is expected.

But, drm-shim isn't really intended to expose other drm-devices. It really wants to create a single fake drm node device. Therefore, I think it makes sense to mask all other drm devices in the system.

This MR scans for device paths that look (roughly speaking) like /dev/dri/* and /sys/dev/char/226:*/device/*. If paths that look like this aren't the actual render_node_minor that drm-shim is emulating, then the device is hidden by drm-shim.

Merge request reports