"Fossies" - the Fresh Open Source Software Archive
Member "mesa-20.1.8/src/drm-shim/README.md" (16 Sep 2020, 1235 Bytes) of package /linux/misc/mesa-20.1.8.tar.xz:
As a special service "Fossies" has tried to format the requested source page into HTML format (assuming markdown format).
Alternatively you can here view
the uninterpreted source code file.
A member file download can also be achieved by clicking within a package contents listing on the according byte size field.
DRM shim - Fake GEM kernel drivers in userspace for CI
On CI systems where we don’t control the kernel, it would be nice to be able to present either no-op GEM devices (for shader-db runs) or simulator-backed GEM devices (for testing against a software simulator or FPGA). This lets us do that by intercepting libc calls and exposing render nodes.
- Doesn’t know how to handle DRM fds getting passed over the wire from X11 (Could we use kmsro to support the X11 case?).
- libc interception is rather glibc-specific and fragile.
- Can easily break gdb if the libc interceptor code is what’s broken. (ulimit -c unlimited and doing gdb on the core after the fact can help)
You choose the backend by setting
LD_PRELOAD to the shim you want. Since this will effectively fake another DRM device to your system, you may need some work on your userspace to get your test application to use it if it’s not the only DRM device present. Setting
DRM_SHIM_DEBUG=1 in the environment will print out what path the shim initialized on.
For piglit tests, you can set:
WAFFLE_GBM_DEVICE=<path from DRM_SHIM_DEBUG>
See your drm-shim backend’s README for details on how to use it.