drm-shim: silence warnings Matt is seeing a bunch of warnings : drm_shim.c:312:4: warning: ignoring return value of ‘asprintf’, declared with attribute warn_unused_result [-Wunused-result] v2: Add nofail variants of *asprintf (Eric) Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Acked-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4594>
drm-shim: Let the driver choose to overwrite the first render node. When I was writing drm-shim, I was focused on the v3d kmsro case -- use my intel device as the kmsro display device and add on a simulator-based v3d device that we could render with. But for the noop backends we use for shader-db, it's a lot more useful to just overwrite the first render node in the system so that you don't have to pass a -d <how many render nodes I already have in my system> argument. Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4664>
drm-shim: stub libdrm's use of realpath() libdrm started using realpath to get the type of bus associated with a given device. This stubs the very specific usage that prevents drm-shim's device from being listed. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Eric Anholt <eric@anholt.net> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4429> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4429>
drm-shim: return device platform as specified v2: Embed the libdrm dependency inside the drm-shim dependency Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Acked-by: Eric Anholt <eric@anholt.net> (v1) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4429>
drm-shim: fix EOF case Close input end of the pipe after data was written. Without this fix I have seen a hang in sysfs_uevent_get(.., "OF_FULLNAME") when key was not found. Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Eric Anholt <eric@anholt.net>
v3d: Introduce a DRM shim for calling out to the simulator. The goal is to enable testing of parts of drivers without depending on any particular kernel version or hardware being present. Simply set LD_PRELOAD=$PREFIX/lib/libv3d_drm_shim.so in your environment, and we'll fake a /dev/dri/renderD128 (or whatever the next available node is) using v3dv3. That node can then be used with the surfaceless or gbm EGL platforms. Acked-by: Iago Toral Quiroga <itoral@igalia.com>